Submitted by reesd on 2011/10/31 12:26
[quote=Pierre_Admin]
Regarding the GDI issue, how many grids do you have opened ? The Icons folder contains how many icon files ? Reducing this has a direct effect on the GDI handles used...
 [/quote]
 
I'm creating a separate thread to discuss GDI usage in IQ. It's been mentioned in a few places, but I thought a dedicated thread would be better to talk just about it.
 
As background, I am finding that IQ is using a lot of GDI handles. It starts with around 1500, but get up to 4000 and even higher. This means its using over a third of the GDI handles that Windows XP supports by default (10000).
 
My other big big GDI hog is Firefox, which can use 1000-4000 itself. Between the two of them I can run out of GDI really quickly, which results in redraw issues across all applications (as described in possible display memory conflict).
 
Each grid I open adds around 250 handles and closing the grid seems to give most if not all of them back. But overtime IQ seems to grab more. I will capture more here if I see how else it seems to grow.
 
I have 70 icons in my icons directory, I thought I had less but more probably were added when I did my last IQ upgrade. I may look at reducing that.
 
In terms of what the GDI handles are, here is a dump from GDIView:
All GDI           : 2104
Pen               : 23
ExtPen            : 0
Brush             : 74
Bitmap            : 1040
Font              : 301
Palette           : 4
Region            : 6
DC                : 81
Metafile DC       : 0
Enhanced metafile DC: 0
Other GDI         : 0
GDI Total         : 1529
 
For folks who are interested in measuring this themselves, the two tools I recommend are Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653) which everyone using Windows really should have and a GDI-specific tool called GDIView (http://www.nirsoft.net/utils/gdi_handles.html) from the great NirSoft.
 
 
Also, here are some related threads/comments on GDI:
http://www.sqlnotes.net/drupal5/index.php?q=node/2365#comment-10767
 

 

Comments

I could easily add a grid property to support or not icons. This would reduce GDI object usage
 
Also, the XP limit is 64K, so it is possible to increase the default value (10K).
 
Another option, is to dynamically load/unload icons as grids are loaded, to keep just the last 2-3 grid with icons loaded
 
 
HTH
 

reesd

2011/10/31 13:45

In reply to by Pierre_Admin

[quote=Pierre_Admin]
I could easily add a grid property to support or not icons. This would reduce GDI object usage
[/quote]
 
Can't you just only load the ones that are used?
 
In any case, the only icon I was using was cross (for Check), and I have removed that. So now I have nothing in the icons dir. It has reduced initial GDI down to 1300. I will let you know what I see over time.
 
Note, I do have a lot of Named Colors. But in the past when I have removed them I haven't seen a lot of difference.
 
[quote=Pierre_Admin]
Also, the XP limit is 64K, so it is possible to increase the default value (10K).
[/quote]
 
Ah, I thought it was 16K, but that Win2K. This article with instructions on increasing it mislead me - http://weblogs.asp.net/mikedopp/archive/2008/05/16/increasing-user-hand…. That said, I see lots of places saying that you really can't increase GDI much beyond 16K because you run into session view space limitations like this post: http://www.msfn.org/board/topic/124087-gdi-memory-issues/page__view__fi…. I had it at 15000, I will try 20000...

Hi,
 
I'm happy to report that the GDI Usage Issue is fixed in v0.9.25W4
 

Armando

2011/12/09 19:50

In reply to by Pierre_Admin

This is super cool ! Thanks. :)
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

reesd

2011/12/11 09:37

In reply to by Pierre_Admin

Wow, then I really, really can't wait for W4 :). Thanks!