2 ms·
Just for clarity, we resorted to C mostly as an experiment to prove our hypothesis that the abstraction and instantiation overhead was genuinely ridiculous. I d
by g_p 6y ago
Just for clarity, we resorted to C mostly as an experiment to prove our hypothesis that the abstraction and instantiation overhead was genuinely ridiculous. I don't have any of the screenshots to hand sadly now, but the performance traces were just appalling. And this was across the board
Our experiment in C showed that it was possible to implement a simple Android "view" or "control" (however it should be called), in native C, with significantly better performance than Android itself provided. It wasn't intended to be the least effort solution, rather a side project to prove something we always suspected.
RecyclerView is a start, but I believe we still found it slow. The delays from malloc()/free() were very significantly lower in impact, though admittedly we weren't doing them in nested loops or anything. I would like to think using C forced us to think more efficiently and we probably did a few little optimizations (noting it was just a side project) that were a bit like the recycler view does, to create enough memory in advance for a feasible scroll buffer both up and down, and fill it as the user moved.