I’ve been experimenting with porting the pcgen.sourceforge.net engine to Android over the last week.

I’ve been experimenting with porting the pcgen.sourceforge.net engine to Android over the last week. My latest obstacle is that PCGen is designed to use 512MB of heap. On my Nexus 7, each Dalvik process gets 64MB of heap. So, I’m very quickly consuming all of the permitted RAM and thrashing the garbage collector before OOM.

Luckily it looks like there might be some low-hanging fruit to save a lot of memory (the data file parser is accidentally retaining huge string buffers because it’s just using substring and split to extract small pieces of the file content.) Still, striving for a factor of 10 improvement in RAM usage is probably a bit ambitious…