Cantabile Development Blog
Follow the development of music software Cantabile
Articles
| Full Index
| RSS Feed
More performance tuning
Continuing on from yesterday's performance tuning:
- The onscreen keyboard now caches a copy of the fully rendered keyboard in an offscreen buffer. Not sure how much CPU this was using but it saved a little.
- Streamlined the image rendering to re-use the same memory device context instead of creating a new one for every piece being rendered.
- The large toolbar buttons now cache the split point for multi-line text - a significant amount of time was being spent continuously recalculating this.
- Noticed a large amount of time was being spent in layout recalculation (about 90ms) and occasionally the same calculations were being done twice! Made some significant improvements here.
So yesterday resizing the main window was taking about 180ms for redraw + about 90ms for layout calculation and screen invalidation. Today that's down to less than 20ms for redraw and 5 ms for layout. That's more than 10 times faster!
Posted on July 26, 2007
Share This
Leave A Comment