AD
Administrator
Syncfusion Team
February 8, 2005 04:01 PM UTC
This is not a reported problem that we are aware of.
Are you using multiple threads and accessing the grid on a thread other than the thread that created it? This is one thing that can cause strange exceptions.
AD
Administrator
Syncfusion Team
February 9, 2005 04:01 PM UTC
Clay,
The problem is not exceptions, but page faults. Something is going on where alot of the information that the grid needs is not im main memory. This problem is easily reproducable ...
If you start any of the samples (I chose the CustomBorders) and open the task manager and look at page faults. If you minimize and the restore the app, you get about 2,000 page faults. If you bring another window infront of the app and then bring the sample back on top, you get about 700 page faults.
There are some post on other message boards about task manager causing faults, so I did it with PerfMon and got similar results.
Steve
>This is not a reported problem that we are aware of.
>
>Are you using multiple threads and accessing the grid on a thread other than the thread that created it? This is one thing that can cause strange exceptions.
AD
Administrator
Syncfusion Team
February 9, 2005 04:08 PM UTC
Hi Steve,
GDI+ drawing causes lots of page faults.
You can switch the grid to native GDI drawing, then the page faults will go away. See RefreshGrid example for switching to GDI.
Stefan
>Clay,
>
>The problem is not exceptions, but page faults. Something is going on where alot of the information that the grid needs is not im main memory. This problem is easily reproducable ...
>
>
>If you start any of the samples (I chose the CustomBorders) and open the task manager and look at page faults. If you minimize and the restore the app, you get about 2,000 page faults. If you bring another window infront of the app and then bring the sample back on top, you get about 700 page faults.
>
>There are some post on other message boards about task manager causing faults, so I did it with PerfMon and got similar results.
>
>Steve
>
>
>
>>This is not a reported problem that we are aware of.
>>
>>Are you using multiple threads and accessing the grid on a thread other than the thread that created it? This is one thing that can cause strange exceptions.
AD
Administrator
Syncfusion Team
February 9, 2005 04:38 PM UTC
Stefan,
I tried what was in the performance grid, which as far as I can see was just override the OnDrawCellDisplayText, OnFillRectangleHook and OnPaintBackground routines. In fact, in my version I just set e.cancel to true and returned. There was no noticable difference in the number of page faults. Any other suggestions?
Steve
AD
Administrator
Syncfusion Team
February 9, 2005 04:52 PM UTC
I ment to say there was no noticable difference in the amount of faults.
AD
Administrator
Syncfusion Team
February 9, 2005 05:25 PM UTC
Hi Steve,
sorry about that. GDI+ triggers a lot of page faults, but when the grid is used it''s actually the Gargabe Collector that weighs in a lot more.
The grids internal volatile data cache is based on the concept that style information is composed at runtime (QueryCellInfo is called to allow dynamic formatting) and weak references (very short lived reference) to these style objects are held in memory. When GC kicks in the weak references are released.
Every time Garbage collection occurs page faults are created. I found a small article here, maybe that sheds some light: http://www.c-sharpcorner.com/Code/2003/Nov/MemoryManagementInNet.asp
There is one sample that replace the default volatile data container. See OneTimeOnlyQueryCellInfo. You should see less page faults there.
Stefan
AD
Administrator
Syncfusion Team
February 9, 2005 07:13 PM UTC
Thanks for the information.
However, I looked at the OneTimeOnlyQueryCellInfo sample and this also generates alot of page faults. Not as much but still about 100 for just changing the selected line via the mouse move.
Steve