More Lua bindings fun

Ahh, the Android build process is always fun.

In my previous blog post I talked about how huge LuaBind and OOLua++ were. Apparently I needed to do a clean build, though, because now I’m getting different numbers I’m an idiot. The new numbers I was seeing was because I was reading their sizes wrong. Divided by two. I’ve updated the incorrect numbers in the previous blog entry. I looked at it again because, frankly, I didn’t believe my own numbers. My binary size for a debug build is 6+Mb, so it seemed reasonable that a release build would be on the order of 2Mb.

The relative numbers for adding new bindings stays about the same. LuaBind looks like it takes around 203k over the base of 1400k, with an overhead of between 24k and 60k for adding various sized bindings. It still grows pretty quickly compared to tolua++, but the difference isn’t nearly as big as I’d originally thought.

200k-400k isn’t nearly as bad, but at the same time, that could represent a reasonable number of assets. If I ended up with 500k in bindings, that would still be ~10% of my “ideal” total impact of no more than 5Mb on the target system.

So my conclusion doesn’t change, but it’s much, much less drastic than I feared.

Update: Some of the original numbers were actually pretty close to correct; unfortunately, the baseline (no bindings) number was one that I got wrong, so it vastly inflated the size of the original bindings. All numbers have been recalculated and are updated in the original post.


comments powered by Disqus