clamsproject / mmif-visualizer

A web site to visualize MultiMedia Interchange Format json
Apache License 2.0
2 stars 1 forks source link

Lazy load *all* tabs to fix slowness #36

Open haydenmccormick opened 2 months ago

haydenmccormick commented 2 months ago

New Feature Summary

When opening certain tabs on larger MMIF files (esp. JSTree), it often imposes a huge burden on the client browser and sometimes freezes it for several seconds. The page often also takes a very long time to load, since it is rendering out each tab at load-time. Instead, each tab should be dynamically loaded in when it is clicked. This would be trivially fast for smaller tabs, and would save a lot of initial load time for more complex ones.

Related

No response

Alternatives

No response

Additional context

The OCR tab is already dynamically loaded in (to save space when storing temp thumbnail files), so other tabs' lazy loading behavior should be an extension of that.

haydenmccormick commented 2 months ago

As an additional benefit, this would also allow the page to load even if a single tab fails to render (for example, in its current form the page will load even if OCR thumbnails can't be generated).