studio
studio copied to clipboard
Cache Library packs to speed up UI thread
Library packs are read in the UI thread and with a large number of packs in the library, this causes extra delays and even exceeds vert.x thread timeout.
While a better design would be to build the library on startup, and rely on filesystem watches to keep it updated (and avoid doing these in the UI thread), this introduces a cache so that library packs read from disks are not re-read from disk for nothing. This results into a snappier experience both when accessing the library for the first time, and also on later refreshs.