openforis / sepal_ui

wrapper for ipyvuetify widgets to unify the display of voila dashboards in the SEPAL plateform
https://map-app.up.railway.app
MIT License
13 stars 4 forks source link

evaluate the performances of the lib #455

Open 12rambau opened 2 years ago

12rambau commented 2 years ago

this can be extended to the applications notebooks.

I'm curious to know if we can improve their performances (they seems drastically long to load).

A nice heuristic to keep in mind:

food for thought on testing both the lib loading and the notebooks: running a notebook as a python script the tuna profiling lib

12rambau commented 1 year ago

@dfguerrerom I checked the lib and it takes 18s to load in tuna which is simply huuuuuuuge. To make you realize how long it is:

there is clearly something wrong. I have 2 guesses:

dfguerrerom commented 1 year ago

Yes, the loading time is extremely slow. I agree with the second point of your guesses, that would reduce an important step on our side, so thumbs up for that one.

12rambau commented 1 year ago

I also found on the web that complex type hints are actually slowing down Python code unless you use the annotation package (https://stackoverflow.com/questions/61544854/from-future-import-annotations). We have a lot of them, we should start using it everywhere untli it becomes the default behavior (not even in 3.11).