I have noticed over the months I have been working on my app that managing foreign languages like Japanese, Chinese, Korean, etc takes a memory hit to the point that it spikes up the memory usage–as one would expect. Sure, I expect more memory usage… but we are talking about a spike from 60mb (normal usage) to 80-100mb usage per entry–thus I was forced to call garbage collector manually as I couldn’t wait for the QML/JavaScript engine to do the clean up when there’s “inactivity”.

So, I was worried and added initial linux support to my app (never been planned to be released under linux) and found out that languages such as Japanese walks a fine line of 40mb memory usage. The garbage collector works twice as fast as well. For example, in Windows I’d call garbage collector and it doesn’t do it that fast. In linux? Blazing fast. It’s not much about the speedness of how fast it takes to free the memory, it’s the usage. I’m talking that Windows still takes 60-80mb+ (and up) while the linux build keeps walking the 40-50mb line.

Now, initially I suspected a memory leak, but that wasn’t the case. The Windows build just takes that much memory, and it worries me. Part of what keeps me at ease is that since this will be an android application; I can expect the same behavior that I get here in my linux mint in Android. Memory will be freed and the usage will be kept at minimum.

Granted: Pure naked eye seeing memory usage is not enough to suggest there’s a memory leak or that there’s a memory mismanagement, that’s the job of a profiler After running valgrind a few times I couldn’t find any memory leak just petty warnings, so I proceeded to guard against it, well, it wasn’t much about guarding as I honestly needed to free the objects that are no longer needed after X time. Plus, I also rationalized the usage that Windows is just being Windows… maybe Qt is pulling something that requires big allocations in Windows, but not in Linux for whatever reason. I do think that it has something to do with the font mechanism in general… but who knows at this point.