3 ms·
I have an Android app on the Play Store which uses Python and can confirm that the startup time is slow because of the imports. I think one possible solution co
by jventura 6y ago
I have an Android app on the Play Store which uses Python and can confirm that the startup time is slow because of the imports. I think one possible solution could be to invoke the start of the interpreter outside the UI thread, at least it could give the illusion of a faster app start. Unfortunatelly the app gives me ~5€/month so it is not profitable enough for me to care.
I opened source the idea at https://github.com/joaoventura/pybridge https://github.com/joaoventura/pybridge
The thing that makes this different from a pure android python project is that I only use Python as a kind of mobile RPC backend. The UI is completely native in Java/Kotlin.
As a side note, today I’ve open sourced the same technique, but for iOS (https://news.ycombinator.com/item?id=23335704 https://news.ycombinator.com/item?id=23335704). I’m able to share all the python code but adapt the UI using the native tools..