Faster Rendering, Still lots of Head Room (Snappy productivity...)
Written by
on
in
Young Coders.
Long day of non-OLPC work today. Spent the evening with a profiler going through productive and whittling down some of the slow spots. It really goes to show that the things you don't think are going to be problems are always the ones to bite you (hence the advice to optimise late in the development process).
Weirdest slow spot: trivial function to determine what frame of a set of frames represents the frame to render for a given fractional value. It's extremely fast on any given iteration, but it was getting called 10,000 times per second or more and taking 7% of total run-time. I optimised it, and then realised that the underlying problem was that I was redoing the rendering pass for every mouse motion event. DUH! Silly "we'll get to it some time" that never got gotten too.
There's lots more fat in the rendering engine still to go, it could easily track a dirty rectangle set and only re-render those territories and tiles in that rectangle. The packUpdate operation is still way too heavy seeming. I suspect a bug somewhere in the implementation of that.
Anyway, tomorrow I'll sit down and see if I can't get the performance to a level where running on a B4 is a pleasant experience instead of a glacial operation. I also need to get my jhbuild environments to see the B4 (likely just have to change the jabber server) so I can test with the game across the two machines. For now, though, it's time to sleep.
Pingbacks
Pingbacks are closed.
Comments
Comments are closed.