Skip to content

Speed up flet debug by caching build template and tarballs #6557

Description

@FeodorFitsner

Discussed in #6555

Originally posted by MarkusPiotrowski June 6, 2026

Question

On my system (Windows 11, internet connection via LAN) building an Android app in debug mode takes about 5 - 15 minutes until the app starts on the phone.

A significant part of this time is spent for downloading the flet-build-template.zip and the python-android-dart... tarballs, because they are not cached:

(flet) PS D:\flet\d4hflet> flet debug android --device-id  XXX -vv
[14:05:40] Run subprocess: ['C:\\Users\\XXX\\flutter\\3.41.7\\bin\\flutter.bat', '--version', '--no-version-check',
           '--suppress-analytics']
...
(   )    Creating app shell from https://github.com/flet-dev/flet/releases/download/v0.85.1/flet-build-template.zip
[14:09:08] Created app shell ✅
...
[14:14:03] [+1896 ms] > Task :serious_python_android:downloadDistArchive_arm64-v8a
           [        ] Caching disabled for task ':serious_python_android:downloadDistArchive_arm64-v8a' because:
           [        ]   Build cache is disabled
           [        ]   Caching has not been enabled for the task
           [        ] Task ':serious_python_android:downloadDistArchive_arm64-v8a' is not up-to-date because:
           [        ]   Task.upToDateWhen is false.
           [        ] Download
           https://github.com/flet-dev/python-build/releases/download/v3.12/python-android-dart-3.12-arm64-v8a.tar.gz
[14:16:01] 
...
[14:16:10] [+1908 ms] > Task :serious_python_android:downloadDistArchive_armeabi-v7a
           [        ] Caching disabled for task ':serious_python_android:downloadDistArchive_armeabi-v7a' because:
           [        ]   Build cache is disabled
           [        ]   Caching has not been enabled for the task
           [        ] Task ':serious_python_android:downloadDistArchive_armeabi-v7a' is not up-to-date because:
           [        ]   Task.upToDateWhen is false.
           [        ] Download
           https://github.com/flet-dev/python-build/releases/download/v3.12/python-android-dart-3.12-armeabi-v7a.tar.gz
[14:17:49]
...
[14:17:58] [+1905 ms] > Task :serious_python_android:downloadDistArchive_x86_64
           [        ] Caching disabled for task ':serious_python_android:downloadDistArchive_x86_64' because:
           [        ]   Build cache is disabled
           [        ]   Caching has not been enabled for the task
           [        ] Task ':serious_python_android:downloadDistArchive_x86_64' is not up-to-date because:
           [        ]   Task.upToDateWhen is false.
           [        ] Download
           https://github.com/flet-dev/python-build/releases/download/v3.12/python-android-dart-3.12-x86_64.tar.gz
[14:20:07]

# Approx. 1 min later the app started on the phone

Unfortunately, using --arch for setting the architecture of my connected device does not help here, because the other tarballs are still downloaded.

Is it possible to cache these files, at least in debug mode or to have a switch in debug mode to allow for caching? I think that during debugging it is quite usual to restart the app quite often after small changes and this long build process is really annoying.

Interestingly, builds are much faster in the night (around 5 min) than during the day (I'm in Germany), indicating that download bandwidth from Github may be limiting here.

Code sample

No response

Error message

No response

------------------------------------------------------

  • I have searched for answers to my question both in the issues and in previous discussions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status
✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions