question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

what happened to the app size?

See original GitHub issue

Starting with beta-05, APK size suddenly jumped from less than 8M to more than 36M, going beyond the size limit of my repo. Taking a look, number of libraries didn’t change, number of architectures was even reduced. What is causing the huge size increase – and can that be mitigated?

Looking inside the APK, libflorisboard-native.so for ARMv7 was around 115k with beta-04, becoming 15M+ (!!) with beta-05. If that cannot be reduced, may I ask for an ARMv7-only build to keep FlorisBoard betas available in my repo? Thanks in advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (20 by maintainers)

github_iconTop GitHub Comments

3reactions
patrickgoldcommented, Jul 18, 2021

I experimented with reducing the APK size and #1082 showcases the first outcome: I fiddled around with the data feature filter, checked what Nuspell really needs from the ICU data and was able to cut down the per-arch size for ICU by about 5MB. This means the APK size is at about 26MB instead of 36MB, which is a huge leap forward.

After pushing the draft commits I then tried to extract the data into data archives (so I don’t need per-arch ICU data files), but for now this didn’t work out that well, will experiment more with it tomorrow, Should this also work, I can further cut down the APK size by a few MB while re-adding support for x86 and x86_64 (which I temporarily disabled to keep the current APK’s size smaller). I still have to do some testing if I didn’t remove too much ICU data, but the first tests on my devices are really promising that everything still works perfectly. Will update you tomorrow with further results.

2reactions
patrickgoldcommented, Jul 18, 2021

I guess the option to ship spell checking separately does not exist (I’m thinking of the tons of language packages available for AnySoftKeyboard)?

AnySoftKeyboard’s language pack are the dictionaries which are added per pack, in FlorisBoard’s case the core functionality itself uses so much space (without any pre-shipped dictionaries at all). Also I try to have every privacy-friendly functionality in the core app to avoid an extension mess just to enable some features. I think the main issue is that hunspell/nuspell isn’t really designed for mobile devices but it is ported and storage isn’t an issue on desktop devices (Nuspell is very small but one of their dependencies - ICU - is a massive package).

Until you find a solution, don’t feel too much pressed with this. As indicated, I’m ready to make exceptions when they cannot be avoided as long as it’s reasonable. So better take the safe road than the fast one, please.

Will do but like I said I don’t like the fact that FlorisBoard exceeds the limit and the APK size issue has to be resolved anyways in the near future - so it is the first thing I am currently experimenting with so I can resolve the size issue.

How do “commercial” keyboards tackle this issue? Are they just enormous or do they simply do their spellchecking on some server? (Wouldn’t make much sense because they also work offline.)

Well GBoard AFAIK is based on the original AOSP keyboard (at least their App ID and their manifest indicate so), but has since then been heavily modified in both adding well implemented and performing features but also a lot of data collection. The dictionary problem is solved by just having full network access and downloading the dictionaries (but like I said this isn’t even the problem with the current APK size issue). Gboard I think uses the word lists in the dictionary files and user dictionary combined with some magic (machine learning maybe?) to make spell checking working (although the spell checker is sometimes a separate system app and thus not included in the Gboard APK size).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon size shrunk - Apple Support Communities
To make apps bigger, select Settings-> Home Screen & Dock -> Use Large App Icons. ... Theses new app icons are the size...
Read more >
Concerns about the rapidly growing app-sizes? : r/Android
Do you think about app sizes at all before installing new things? ... Same thing is happening with game sizes on consoles and...
Read more >
Why does app size increase after installing it? - Quora
The apps themselves do not take up more space. The more you use the apps, the more data is accumulated. The data files...
Read more >
Choose the backup quality of your photos & videos - Android
Download and install the Google Photos app. Reduce the size of your photos & videos. If you have photos in Original quality and...
Read more >
App Screen Grid Size S22 Ultra - YouTube
This is adjust the App Screen Grid Size S22 Ultra so more Apps can fit on screen. Have Five (5) icon in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found