3 ms·
Very cool! But you can write apps in Java and not have big apk sizes... I have a pretty well optimized collaborative drawing pixel art app on the marketplace an
by winrid 7y ago
Very cool! But you can write apps in Java and not have big apk sizes... I have a pretty well optimized collaborative drawing pixel art app on the marketplace and it's < 8mb last I checked.
- Lerc 7y agoTo provide perspective, there was a time when people joked that EMACS stood for Eight Megabytes Always Constantly Swapping. Big is a notion that has changed over the years. Comparing to what I did on my 2.5 megabyte Amiga, I feel like more should be done with less.
- beagle3 7y agoI’ve recently pulled up Mission Impossible, Cybernoid II and International Karate on my C64 and played for a few hours. One of these games has synthesized speech. Each of them fits in less than 64K, on a processor that can be implemented with 930 logic gates (although the original 1978 version had about 3000 transistors which is a bit more) Nostalgia isn’t what it used to be.
- psanford 7y agoAs a funny aside, I built the emacs-native branch for the first time this week and I had to upgrade from 16GB to 32GB of ram for the build process to not run out of memory.
- iib 7y agoDo you know if not having enough RAM would result in segmentation faults during the build process? Or how exactly does it manifest? I have way less than 16 GB and when I tried to compile it a week ago, it segfaulted during the build, but I am unsure of the causes.
- psanford 7y agoIt was running out of memory trying to compile `leim/ja-dic/ja-dic.el`. A segfault sounds like a different issue.
- pantalaimon 7y agoOn Linux if you run out of memory the OOM killer tries to find the process consuming the most RAM and kills it. Unfriendly it’s not always triggered fast enough, so your system might lock up slowing to a crawl swapping before it gets a chance to run. You’ll find a message about it in dmesg
- wffurr 7y ago8MB is 1600X the size of the example app in C.
- winrid 7y agoWell, for one, the app in question does a lot more than the example app in C. The example app doesn't even support half the permissions my app uses. Add those and you're probably in megabyte territory. Even if not, the point is that for apps going on the marketplace - this kind of thing probably isn't worth it.
- wingi 7y agoOnly adding permissions and some functions on it - it will not blow to 8 mb...
- winrid 7y agoWhat about a drawing mechanism like Canvas? What about custom font support? JSON serialisation? Google Play Services support? A websocket client? That's just off the top of my head the dependencies of said app. I'm not confident the C one would be much smaller, especially since Java's bytecode is more compact.
- benibela 7y agoJava has a good chance to be smaller When you need a library you either call one of the Java default libraries (through JNI which I suspect is larger than a class file) or include a native library. And the native code needs to be included four times for different CPUs. Or you need four different apks Probably the normal apks are so big, because they include the support library or the Kotlin standard library
- kllrnohj 7y agoJava's bytecode is also more information dense than assembly is. Even if you only support a single architecture, a pure-Java Android app is going to almost certainly be smaller than a pure-C one, and by non-trivial amounts. If you start adding things like the Kotlin standardy library or Jetpack libraries or whatever then yes size balloons. But so too will the C app's size as its feature set expands to match. For example if this framework supported text[1] its size would explode as it grew ICU, FreeType, etc... dependencies, which are "huge." 1: yes there is a CNFGDrawText function but it uses a static map ( https://github.com/cntools/rawdraw/blob/a2a9f3c88b5caf92ef3c4e9bce145815ed25e2f6/CNFGFunctions.c#L54 https://github.com/cntools/rawdraw/blob/a2a9f3c88b5caf92ef3c... ) which I'm pretty sure is ASCII only, and obviously doesn't support fonts. Or internationalization of any kind. And similarly for text layout it only "works" because it's always monospace with a known "font" ( https://github.com/cntools/rawdraw/blob/a2a9f3c88b5caf92ef3c4e9bce145815ed25e2f6/CNFGFunctions.c#L240 https://github.com/cntools/rawdraw/blob/a2a9f3c88b5caf92ef3c... )