flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
10.79k stars 417 forks source link

There is a problem with the size of the packaged program file #3048

Open icsos opened 4 months ago

icsos commented 4 months ago

The latest version of packaged program files is more than twice as large as before。 Windows10, Python 3.8.10

V0.19.0: flet pack main.py: 31,954 KB V0.19.0: pyinstaller -F -w main.py: 30,651 KB V0.22.0: flet pack main.py: 76,558 KB V0.22.0: pyinstaller -F -w main.py: 51,296 KB V0.23.2: flet pack main.py: 77,353 KB V0.23.2: pyinstaller -F -w main.py: 52.127 KB code:

import flet as ft

def main(page: ft.Page):
    page.title = "ToDo App"
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
    page.update()

    page.add(ft.Text(value='test'))

ft.app(target=main)

requirements.txt: flet pyinstaller

BrentHuang commented 4 months ago

it‘s too big. Is there any way to reduce it?

icsos commented 3 months ago

The new version (0.22.1) has the same issue.

icsos commented 2 months ago

The new version (0.23.0) has the same issue.

BrentHuang commented 1 month ago

desktop, android apk, web, after build, all too big size.

BrentHuang commented 1 month ago

Another problem is the startup speed. After build, the startup speed is slow.

I am using flet to make a web project and a desktop project. Customers cannot accept such a large size and such a slow startup speed. These two problems greatly affect the large-scale commercial use of Flet.

icsos commented 1 day ago

The new version (0.24.1) has the same issue. It looks like something was packed twice.