Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Reduce loading times in docs #27

Closed
AntonioMateoGomez opened this issue Mar 16, 2020 · 7 comments
Closed

Reduce loading times in docs #27

AntonioMateoGomez opened this issue Mar 16, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@AntonioMateoGomez
Copy link
Collaborator

AntonioMateoGomez commented Mar 16, 2020

Right now we seem to load all runnable snippets at once, and takes a few seconds after loading a page. It's around 7-8 seconds for me, meanwhile nothing is clickable. Once snippets are loaded everything goes back to normal.

This page can be a good example of the issue

We may should do lazy loading on scroll and load them like one by one to fix that problem.

@AntonioMateoGomez AntonioMateoGomez added the enhancement New feature or request label Mar 16, 2020
@AntonioMateoGomez AntonioMateoGomez self-assigned this Mar 16, 2020
@AntonioMateoGomez
Copy link
Collaborator Author

Closed through #45

@rachelcarmena
Copy link
Member

rachelcarmena commented Apr 23, 2020

@AntonioMateoGomez , @AntonioMateoGomez , thanks for the improvement!! I was talking to @JorgeCastilloPrz about it, because he still notices a different load time with: https://arrow-kt.io/docs/0.10/fx/. He was comparing the time with https://arrow-kt.io/docs/0.10/fx/async/

And it's true, it's really different.

So... I compared the source code for both pages and... 🎉 there are 2 Easter eggs at https://arrow-kt.io/docs/0.10/fx/ 😅

Please, open the code snippets for Side effects section and the second one for Applying side effects with !effect.

I'll create an issue to fix them 😉

@rachelcarmena
Copy link
Member

"fix them" = instead of running the compilation with an error, disable execution and show the error.

@calvellido
Copy link
Member

calvellido commented Apr 23, 2020

I feel like those errors (the easter eggs 😅 ) are on the Ank side, as Arrow Playground doesn't interpret the code snippet unless is set as executable and you hit the button.

@rachelcarmena
Copy link
Member

I feel like those errors (the easter eggs sweat_smile ) are on the Ank side, as Arrow Playground doesn't interpret the code snippet unless is set as executable and you hit the button.

Right! Thanks @calvellido. However, they are more than 2 thousand lines of multiple span sections and then hidden. Let's see what happens if they are removed because it's the only difference in that page. Thanks!!! 🙌

@calvellido
Copy link
Member

Ahh yeah, I see what you mean now. Right spotted! Yeah, that could be degrading performance as the snippets got analyzed through hljs too, so a big chunk could be making that process to slow the load.

@rachelcarmena
Copy link
Member

Ahh yeah, I see what you mean now. Right spotted! Yeah, that could be degrading performance as the snippets got analyzed through hljs too, so a big chunk could be making that process to slow the load.

Thanks!! Let's see what happens when they are removed. However, this fix improved the load time as well. Thanks!!! 🙌

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants