coastal-science / call-catalog-viewer

https://orca.research.sfu.ca/catalogue
Other
1 stars 0 forks source link

Viewer load too slow on low-bandwidth connection #8

Closed scottveirs closed 7 months ago

scottveirs commented 2 years ago

I tried to access the catalogue (Chrome, MacBook) when I was visiting Orcasound Lab on the west side of San Juan Island. At this location in Washington, the download bandwidth is pretty limited (5 MB/s down; 0.1 MB/s up).

The catalog loaded slowly, taking 30-60 seconds to complete, possibly due to other traffic on the LAN. This seems to be due to the images having a file size of about 100kB and the initial/default view of catalogue involving some 90 images. That's about 10MB which could result in a similar performance issue on e.g. mobile devices.

Screen Shot 2022-09-07 at 3 15 28 PM Screen Shot 2022-09-07 at 3 15 42 PM Screen Shot 2022-09-07 at 3 17 44 PM

I'm pretty sure I had already loaded the catalogue in this location on this browser+device, so am wondering whether there is a way to force the catalogue code to use cached images first, rather than downloading again?

Alternatively, this issue could motivate a simplified initial/default view -- e.g. one that presents only one example of each call type first, then gives an option to download/view more examples subsequently...

git-steb commented 2 years ago

Thanks for pointing out a low-bandwidth use case. We'll investigate, if we could use even smaller thumbnail files (or none) in certain views.

Some quick remedies for now:

a) If you use the most recent version of the catalogue you have a choice to only new N results per page. This would allow you to truncate the number of downloaded images.

b) Not sure, if this resolves the issue, but I made a small modification 75ee40a871e0163ba915735c472a9deddd2b6abf that enables lazy image loading for the thumbnails, i.e. only the ones in view are downloaded.

c) Ensure you are using the site from its current location at https://orca.research.sfu.ca/catalogue to check if the new feature makes any difference.

If lazy loading already resolves the issue for you, feel free to close it.

We'll try to link further changes to the thumbnail loading performance (e.g. adding an option to show none, or smaller files, etc.) here, as well.

scottveirs commented 1 year ago

Hey Steven,

I think the lazy loading may have introduced a new difficulty. Even on a fast connection (35Mbps down), I'm finding that it can take 5-10 seconds to play the first sound that is clicked, apparently because the visible thumbnails are still busy being downloaded and take priority over the audio file being downloaded and played ASAP.

Screen Shot 2022-10-08 at 4 07 17 PM
VWJF commented 1 year ago

Addressed with PR #30 and srkw-call-catalogue-files PR #11

VWJF commented 7 months ago

Closing this issue. Will create a new issue if it becomes a concern again.