Sonntag, 8. Februar 2009

Optimizing Tennix for Maemo

As I promised some weeks ago, here are the results of our take on optimizing a SDL game (Tennix) for the Maemo devices. All other platforms on which Tennix runs obviously also profit from these optimizations. The presentation with all the details is available here: Optimizing an open source game for mobile devices (PDF). I also have two videos for you: Tennix running on a tablet before and after the optimizations.

Conclusions: Do profile (using oprofile or gprof) your applications to find bottlenecks. Look at callgraphs (using graphviz) to determine function usage. Most of the time, small code changes result in big performance boosts. Some Maemo-specific hints for SDL development are available in Game development in the Maemo Wiki.

The optimized release of Tennix (0.7.0) is available in Maemo Extras already. Go get it! :)

Kommentare:

Marius Gedminas hat gesagt…

Posts about optimization are always very interesting, thanks!

I like your description about a benchmark mode (perhaps because I essentially did the same thing when I was trying to optimize pyspacewar -- great minds think alike etc. ;).

I would like to see more details, e.g. how exactly do you use oprofile to get the results? What's the command line to generate a call graph (and is it based on profiler output, or static source code analysis)?

thp hat gesagt…

For oprofile, there is a tutorial at http://maemo.org/development/tools/doc/diablo/oprofile/ that I followed. We did about the same thing on our laptops (the oprofile results in the presentation are from a laptop).

The documentation for how to generate callgraphs by static binary code analysis is here:

http://repo.or.cz/w/tennix.git?a=blob;f=doc/callgraph.txt;hb=HEAD

Jayesh hat gesagt…

Good presentation. The videos would have been more effective if you could show the 'top' output in both cases as well.