slidewiki-platform icon indicating copy to clipboard operation
slidewiki-platform copied to clipboard

Replace src with data-src to enable lazy loading

Open kadevgraaf opened this issue 6 years ago • 5 comments

I cannot see a lot of difference in performance, e.g., between the same presentation on http://localhost:3000/presentation/2201-1/test-a-big-big-big-deck/2201-1 /#/slide-12856-1 and on https://platform.experimental.slidewiki.org/presentation/2201-1/test-a-b ig-big-big-deck/2201-1/#/slide-12788-1 (without data-src)

kadevgraaf avatar Jun 29 '18 11:06 kadevgraaf

According to my tests it is a little faster for the initial load (e.g. useful for mobile users) and only preloads images for the first two slides. If an image has been once loaded, it is not discarded as the user navigates away from the slide. Thus all loaded images will stay in the DOM/Browser. This changes requires the user to have an available internet connection all the time - if the internet connection drops the slideshow will lack images.

rmeissn avatar Jun 29 '18 12:06 rmeissn

Thanks for investigating this @rmeissn !! How much faster is it? Not requiring an internet connection is also important (although you can download/export HTML), so we need to decide whether the benefits outweigh the costs. As a user I would rather much wait 1 second longer than risking that my presentation does not work anymore when internet goes down. E.g. at conferences I preload presentations in a separate tab a long time before I start presenting. @ali1k suggested having a switch to the presenter mode in which you can enable lazy loading, but this is extra work that again might not outweigh the benefits if the loading time is only 100 milliseconds less on average. @abijames what do you think?

kadevgraaf avatar Jun 29 '18 13:06 kadevgraaf

Regarding offline access - we have the HTML download for that which I have used at conferences. I think we should promote this as the ideal option where internet connection is unreliable.

abijames avatar Jul 02 '18 09:07 abijames

Thanks for the feedback! @abijames - What do you mean by "promote" ? should we have an option button for "normal" and "lazy" loading? or a tooltip "Lazy-loading speeds up when starting presentation of a large deck. Use the offline version if you internet connection is slow or unreliability".

I think the switch button is better, as I would normally prefer non-lazy loading while presenting. We can then still have a tooltip.

kadevgraaf avatar Jul 02 '18 09:07 kadevgraaf

I will try to measure the speedup of this option, so we have some reliable data to decide if it's worth spending the time. @bwulff Could you setup all services at testing and the database of slidewiki.org? I would prefer to use a server that is not used much for these kinds of tests. I will probably be able to test on 03 to 05 July.

rmeissn avatar Jul 02 '18 11:07 rmeissn