Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace src with data-src to enable lazy loading #924

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kadevgraaf
Copy link
Member

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)

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 kadevgraaf self-assigned this Jun 29, 2018
@kadevgraaf kadevgraaf requested review from abijames and rmeissn June 29, 2018 11:03
@rmeissn
Copy link
Member

rmeissn commented Jun 29, 2018

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.

@kadevgraaf
Copy link
Member Author

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?

@abijames
Copy link
Contributor

abijames commented Jul 2, 2018

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.

@kadevgraaf
Copy link
Member Author

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.

@rmeissn
Copy link
Member

rmeissn commented Jul 2, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants