Revision 677082

Go back to digest for 24th June 2007

Optimization in Games

Dmitry Suzdalev committed changes in /trunk/KDE/kdegames/klines:

Slight optimisation in background drawing plus some vars renaming.

Still startup is kind of not-so-fast. I figured out that KLinesRenderer::rerenderPixmaps() is faulty - it takes about 600 ms for medium-sized main window...
It creates a bunch (about 100) of small QPixmaps and renders them from svg. Callgrind shows that most expensive call is QPixmap::fill(Qt::transparent).

But I have no idea how to implement this in other way. Scrathed my head for the whole day (while staring at this method) and came up with nothing useful... :) (tried to use QImage Slight optimisation in background drawing plus some vars renaming.

Still startup is kind of not-so-fast. I figured out that KLinesRenderer::rerenderPixmaps() is faulty - it takes about 600 ms for medium-sized main window...
It creates a bunch (about 100) of small QPixmaps and renders them from svg.
Callgrind shows that most expensive call is QPixmap::fill(Qt::transparent).

But I have no idea how to implement this in other way. Scrathed my head for the whole day (while staring at this method) and came up with nothing useful... :) (tried to use QImage & convert it to pixmap => same timings)

Perhaps some brilliant idea is floating somewhere near in atmosphere...
I'm prepared to catch it immediately after I spot it in my line of sight ;) convert it to pixmap => same timings)

Perhaps some brilliant idea is floating somewhere near in atmosphere...
I'm prepared to catch it immediately after I spot it in my line of sight ;)

File Changes

Modified 2 files
  • /trunk/KDE/kdegames/klines
  •   /renderer.cpp
  •   /scene.cpp
2 files changed in total