brainglobe / brainrender-napari

A napari plugin to render BrainGlobe atlases and associated data as layers.
BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

Local cache of atlases #127

Open alessandrofelder opened 6 months ago

alessandrofelder commented 6 months ago

Is it worth caching the results of get_downloaded_atlases(), get_atlases_lastversions(), and get_all_atlases_lastversions() somewhere and updating them when model().referesh_data() is called?

Same for https://github.com/brainglobe/brainrender-napari/blob/37d93e89cf6a72d3847f4cde32e0ac9a0675c8ad/brainrender_napari/widgets/atlas_viewer_view.py#L108-L118

_Originally posted by @IgorTatarnikov in https://github.com/brainglobe/brainrender-napari/pull/124#discussion_r1439395291_

alessandrofelder commented 5 months ago

https://doc.qt.io/qt-6/qabstractitemmodel.html#match may come in handy here.