pandaxtc / towa

A web-based viewer for DeepZoom (.dzi) images.
MIT License
8 stars 3 forks source link

Memory management of createObjectURL #12

Open abiswas97 opened 1 year ago

abiswas97 commented 1 year ago

Hi,

Firstly, this repo is exactly what I was trying to solve! This is great work and I have a lot to learn from your implementation :))

I had been trying to accomplish this in OSD without forking the source, and ended up making a dirty version using deckGL's TileLayer instead. My implementation is similar, of maintaining handles to the dzi file and it's tile directory, and constructing a file handle to the requested png on demand.

Did you face any memory issues with creating several object URLs? If so, how did you tackle it?

pandaxtc commented 11 months ago

Thanks for your kind words! I unfortunately don't have any really large DeepZoom pyramids to check with anymore, but when I was testing a few years ago, I could open hundred-gigabyte images without any particularly noticeable problems on my machine, so memory usage wasn't a very pressing concern.

I'm not too familiar with how React's component lifecycle behaves with regards to the OpenSeaDragon viewer, so it might be possible that opening images repeatedly will leak memory.