4 ms·
I'm hacking scala for android and in my experience scala is really awful with allocations. When using idiomatic scala in a game loop the gc kicks in 10 times a
by teh 16y ago
I'm hacking scala for android and in my experience scala is really awful with allocations. When using idiomatic scala in a game loop the gc kicks in 10 times a seconds, making the app unusable. There are a lot of "invisible" allocations, i.e. allocations that happen even when you don't use "new".
But even without scala-idioms scala is so much nicer than java that I never want to go back.
- Dn_Ab 16y agoNice. Can you go over more what scala idioms you mean and how you replaced them with java/imperative? idioms. A friend and I are just starting coding a small android app in Scala for learning and are always on the look out for info. Any resources you can provide would be awesome as well (I've seen you need to take steps to reduce scala-library bloat). Cheers!
- teh 16y agoHi, sorry for the late reply: I have a (short) summary here: http://teh.gitblogs.com/post/how-to-avoid-allocations-when-using-scala-on-android http://teh.gitblogs.com/post/how-to-avoid-allocations-when-u... For reducing the library size see e.g. http://github.com/teh/androidmake http://github.com/teh/androidmake I've seen others do similar things, you'll need to google for their solutions.