Replies: 4 comments
-
I don't think it is possible at this point in time.. For context :
Duplicate of : |
Beta Was this translation helpful? Give feedback.
-
intresting. though i dont think its a duplicate of #3056 because this request optimization of the flet build web process. with flet build web --wasm we are getting close to sub 3 second start up, but scrunching down app.zip would be the last mile |
Beta Was this translation helpful? Give feedback.
-
My guts tell me tree-shaking for Python is non-trivial task. Some tools, such as PyInstaller (or maybe Nuitka?) tries to solve that, but it's not 100% possible to analyze all imports. |
Beta Was this translation helpful? Give feedback.
-
My apologies, i saw
The problem with python is those pesky C extensions, those are pretty much the size gobblers. |
Beta Was this translation helpful? Give feedback.
-
A minimal "hello flet" web when compiled with flet build web produces an app.zip of 3 megs. Inside is the entirety of flet with controls not used by the app.
This produces a long startup time making the user experience feel laggy even broken
Is there a possibility of 'tree shaking' so the resulting app.zip only contains the necessary flet code that is used by the application.
The idea would be to do a source analysis and only use the stuff that is imported.
Or allow the developer to list out the components they want to include.
Beta Was this translation helpful? Give feedback.
All reactions