improve loading speed of the applications
Opened this issue · 4 comments
it seems multiple limitation are currently making application super slow to load. I thin a benchmark with tuna (#455) remains necessary, publishing the lib as an extension (#724) as well but these are complex modification that requires lots of efforts.
On the other hand looking at the latest development made by @dfguerrerom in sepal-contrib, I was thinking maybe we could fully integrate the lazy loading of the widget in the lib design.
- for a panel app, only load the shown widget at start and lazy load the others upon click on the draweritems
- for map application don't load any of the Views in the MapButton and only load the content upon first click
I'm not sure it would be that complicated, what do you think ?
Thanks for bringing this topic in. Two things to say on this one:
-
There are some modules that can simple work without the lazy import, so if we really want to go through this implementation, we can do it with some optional arguments? I would like to have a clear idea on how this will work, I will be thinking on that and come up later with more thoughts...
-
For other apps as
gwb
, where all the steps are fully independent I think we can use alanding_page
, as I just did on sepal-contrib/gwb@c9da838 (sorry for the boilerplate code but I hadn't time) and sepal-contrib/gwb@0c4c750, that's pretty much your second point. -
I found a workaround (hack) to finally fix openforis/sepal#102 (comment), you can see the implementation on https://github.com/sepal-contrib/gwb/blob/master/ui.ipynb in the last two cells, when the apps are taking too long to load, users will have a message, I think we can use that message at the end by default...
I found a workaround (hack) to finally fix change the message for module loading openforis/sepal#102 (comment), you can see the implementation on https://github.com/sepal-contrib/gwb/blob/master/ui.ipynb in the last two cells, when the apps are taking too long to load, users will have a message, I think we can use that message at the end by default...
Finaly some clever idea on this one. I'm sad that it is as simple as adding a .md cell.....
But you are also removing the loading from voila right ?
I'm not removing the loading from voila, we;ll have "voila loading" when the imports and python packages are building the app, then we'll have the html
message with an id="loading_message"
until the js
creates the ui
, once the UI is fully loaded, there's a simple html style
that will hide that element...
Yes, it's too sad have missed it for so long time :/
Now that I've worked with that GWB module that uses sepal_ui==2.4.0
I think we have done something that makes the package to take too long to load... we'll have to further investigate that.