Saturday, August 25, 2007

Page faults using GDI+

I'm working on a C4I application using GIS maps.
The map is refreshed (redrawn) by calling the Control.Invalidate() method.
What got my attention was seeing few thousands of page faults on each refresh, resulting in CPU usage of 3-6%.

After some research, this is the response I got from Hans Passant in the MSDN forums:
"GDI+ bitmaps use memory mapped files. The bitmap data gets loaded into memory through page faults."

Now if I only could figure out why in older versions of the application there were no page faults, especially if he is right and this is the normal mode of operation.

No comments: