Friday, June 23, 2006 6:31 AM
I've written a WrapPanel that does a lens effect on the controls as you move the mouse over. You can see it in action here:
and download the source here:
I have the problem that when running it in debug over and over it gets slower and slower. I've traced the problem down to PresentationFontCache.exe, and if I kill this process before running again my app returns to full speed. I'm wondering what I can do to avoid this problem.
I noticed that having too many different scale transforms applied in a sequence caused a problem, so I've reduced the number of possible transforms by round my scaled rectangle to the nearest pixel like this:ScaleTransform transform = new ScaleTransform(Math.Round(theRect.Width)/Math.Round(renderedSize.Width), Math.Round(theRect.Height)/Math.Round(renderedSize.Height));
I'm wondering if maybe there is a way of cleaning out the font cache when I first run my app?
Monday, June 26, 2006 12:22 AM
I've realised that my Athlon 64 4800+ dual core is a really fast machine. I've tried running this panel on other machines and it runs slowly on the first run.
On my Athlon though, it initially appears to be running at a smooth frame rate.
Thursday, June 29, 2006 1:09 AM
I'm starting to think that on a really fast machine PresentationFontCache slows things down in general. I've got a X-Y chart control with zoom and pan, and I notice that ending the PresentationFontCache process while it's running subjectively makes the panning and zooming smoother.
Monday, July 10, 2006 4:43 AMThis problem seems to have gone away with the June 2006 CTP