MetaCell / salk-interactive-atlas

1 stars 0 forks source link

Too many downloads of probability maps when switching on other populations #116

Open zsinnema opened 2 years ago

zsinnema commented 2 years ago

When switching on a second, third etc population and the density map switch (overlay) is active and a probability map is active then all probability maps of all the switched on populations are loaded.

It would be better (performance wise) to only load the one that is not already loaded

zsinnema commented 2 years ago

https://user-images.githubusercontent.com/124044/169300079-f9011b91-c007-46ce-8f84-6e6cd3cd64a7.mp4

zsinnema commented 2 years ago

btw same when switching off a population, this should even not load anything.....

afonsobspinto commented 2 years ago

Yeah I haven't consider any optimizations on the requests because I thought the browser would cache the get requests so it wouldn't be a problem. I will add logic to keep track of what's loaded and infer what's missing from it