Обсуждение: Excessive GDI objects under WIN32

Поиск
Список
Период
Сортировка

Excessive GDI objects under WIN32

От
Zac Bowling
Дата:
This maybe wxWidgets fault but pgadmin sure is using a lot of GDI 
objects. It releases them ok when you close different windows but it 
seems to allocating way more then would seem necessary. I do a lot of 
postgres related development at work and I have to setup pgadmin on a 
lot of slower windows machines, and those GDI objects are very precious 
to me. With only 5 windows open, its possible to run almost completely 
out. Visual Studio is another beast but not as bad as pgadmin with 4 
windows open. Any clue where and when in wxwidgets (I'm more of gtk and 
cocoa developer so I don't know) those GDI objects get allocated and if 
anyone knows if this is related more to wxWidgets (maybe something I 
could rebuild myself with a different backend or something) or the code 
in general?


Zac Bowling
-
http://www.zacbowling.com/


Re: Excessive GDI objects under WIN32

От
Andreas Pflug
Дата:
Zac Bowling wrote:
> This maybe wxWidgets fault but pgadmin sure is using a lot of GDI 
> objects. It releases them ok when you close different windows but it 
> seems to allocating way more then would seem necessary. I do a lot of 
> postgres related development at work and I have to setup pgadmin on a 
> lot of slower windows machines, and those GDI objects are very precious 
> to me. With only 5 windows open, its possible to run almost completely 
> out. Visual Studio is another beast but not as bad as pgadmin with 4 
> windows open. Any clue where and when in wxwidgets (I'm more of gtk and 
> cocoa developer so I don't know) those GDI objects get allocated and if 
> anyone knows if this is related more to wxWidgets (maybe something I 
> could rebuild myself with a different backend or something) or the code 
> in general?

pgAdmin needs those. If you're short of GDI objects, you must be running 
win98 or so.

Regards,
Andreas


Re: Excessive GDI objects under WIN32

От
"Zac Bowling"
Дата:
Yeah,
I'm debating that it needs GDI objects. Everything with a GUI needs a few, but 1029 GDI objects for 4 windows is a lot
morethen it seems nessiary. Visual Studio 2005 with over 30 tabs only requires 820 and it took me 31 IE windows with
nothingbut flash and tons of form objects to get up to barely get to 1000. I can max out the 10,000 max pretty quick
(eventhough you can increase the max in the registry it causes strange things to happen.) I'm not sure if its purely
insidewxWidgets or its something unique to pgAdmin or not though. 


Zac Bowling

Applications Engineer, Email Systems (Contractor)
Match.com International

desk:  214-576-3228
home:  972-437-6272
mobile: 1-469-667-0395
msn: zac@zacbowling.com

-----Original Message-----
From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Andreas Pflug
Sent: Monday, February 13, 2006 3:17 AM
To: Zac Bowling
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Excessive GDI objects under WIN32

Zac Bowling wrote:
> This maybe wxWidgets fault but pgadmin sure is using a lot of GDI
> objects. It releases them ok when you close different windows but it
> seems to allocating way more then would seem necessary. I do a lot of
> postgres related development at work and I have to setup pgadmin on a
> lot of slower windows machines, and those GDI objects are very
> precious to me. With only 5 windows open, its possible to run almost
> completely out. Visual Studio is another beast but not as bad as
> pgadmin with 4 windows open. Any clue where and when in wxwidgets (I'm
> more of gtk and cocoa developer so I don't know) those GDI objects get
> allocated and if anyone knows if this is related more to wxWidgets
> (maybe something I could rebuild myself with a different backend or
> something) or the code in general?

pgAdmin needs those. If you're short of GDI objects, you must be running
win98 or so.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Re: Excessive GDI objects under WIN32

От
"Zac Bowling"
Дата:
I meant to say "not" :-) sorry.

It is just a wee bit excessive.

http://www.zbowling.com/gdiobjects.PNG

Not to try and compare apples to oranges but isqlw.exe (Microsoft's Query Analyzer for the god awful beast that is MS
SQLServer) is in there as well with 4x the number of windows and its running with only 320 GDI objects. Since we have a
teamof 10 postgres servers (not currently replicated between each other) for an internal processing system, that I end
upquerying them one by one sometimes. With 10 windows, I have to remember to shut some stuff or suffer the missing menu
disorder(a funny term I coined when you run out of gdi objects and button labels, menus, controls, etc start
disapearing).However on my 64bit xp system (this one is a 32bit Win 2003 system in the pic), I have a limit of 300,000
gdiobjects and even running under 32bit wow mode, I never see anything like that, but for the 32bit challanged, it can
bea headache. 

Zac Bowling
Applications Engineer, Email Systems
Match.com International

desk:  214-576-3228
home:  972-437-6272
mobile: 1-469-667-0395
msn: zac@zacbowling.com

-----Original Message-----
From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
Sent: Monday, February 13, 2006 10:23 AM
To: Zac Bowling
Subject: Re: [pgadmin-support] Excessive GDI objects under WIN32

Zac Bowling wrote:
> Yeah,
> I'm debating that it needs GDI objects.

Do not debate this. Its windows. 1000 objects is far from excessive for this kind of app.

Regards,
Andreas


Re: Excessive GDI objects under WIN32

От
Andreas Pflug
Дата:
Zac Bowling wrote:
> Yeah,
> I'm debating that it needs GDI objects. 
Then use psql. Debating the use of GDI objects is extraordinarily silly.


Regards,
Andreas



Re: Excessive GDI objects under WIN32

От
"Zac Bowling"
Дата:
The use of them isn't or not isn't a valid debate, but the over use of them is very valid. Anyways, I think I found the
problem,and it appears to be inheirt to wxWidgets (had to rip it apart to find it). Some funny code comments around it
aswell. I'm going to send the patch in soon if I can fix it easily, but there might be a way to fix it in pgadmin
withouthaving to fix wxWidgets if anyone is interested. I'll reply later with more info when I get done and I get my
buildenvironment is setup correctly.  


Zac Bowling
Applications Engineer, Email Systems
Match.com International

desk:  214-576-3228
home:  972-437-6272
mobile: 1-469-667-0395
msn: zac@zacbowling.com

-----Original Message-----
From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Andreas Pflug
Sent: Monday, February 13, 2006 4:40 PM
To: Zac Bowling
Cc: Zac Bowling; pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Excessive GDI objects under WIN32

Zac Bowling wrote:
> Yeah,
> I'm debating that it needs GDI objects.
Then use psql. Debating the use of GDI objects is extraordinarily silly.


Regards,
Andreas


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Re: Excessive GDI objects under WIN32

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Zac Bowling
> Sent: 13 February 2006 22:50
> To: Andreas Pflug
> Cc: Zac Bowling; pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] Excessive GDI objects under WIN32
>
>
> The use of them isn't or not isn't a valid debate, but the
> over use of them is very valid. Anyways, I think I found the
> problem, and it appears to be inheirt to wxWidgets (had to
> rip it apart to find it). Some funny code comments around it
> as well. I'm going to send the patch in soon if I can fix it
> easily, but there might be a way to fix it in pgadmin without
> having to fix wxWidgets if anyone is interested. I'll reply
> later with more info when I get done and I get my build
> environment is setup correctly.

Yes, we're interested if it's a non-invasive (and appropriate) fix in
pgAdmin. I don't entirely disagree with Andreas' POV (I don't ever
recall hearing of anyone running out of GDI's running pgAdmin), and I've
certainly run it simultaneously with VC++6 and VS 2k3 & 2k5 (at the same
time - don't ask!!) without problems, but it doesn't hurt to save
resources.

Regards, Dave.


Re: Excessive GDI objects under WIN32

От
"Zac Bowling"
Дата:
Hehe, yah. I'm runny pretty loaded here with VS2005, VS2003, VS6, VMWare, about 30 putty windows open at any time (half
disconnectedbecause I'm to lazy to close them), every other ms-sql tool for 2000 and 2005, msn messanger, winamp,
itunes,nunit, nant, crusecontrol.net, msdn docs (3 versions 1998, 1999-2005, and 2005s new one), about 30 IE windows
andabout 30 firefox windows (to compare :-P), dreamweaver, a full blown j2ee server running cold fusion and jsp, and a
postgresand SQL Server. Oh and you can't forget I'm running cygwin with the sshd server and the tools in my path, debug
symbolsfor windows (they hurts a tad), and various desktop sharing apps for conferencing. Blah... (I love my job)...   

I'm having trouble fixing my paths (because of the version of the platform sdk I'm running) to finish building
wxWidgetsat the moment and I'm doing this in and out of my daily duties here at work so its going to take me a few days
toget this working. I should have something soon though. :-) 

Zac Bowling
Applications Engineer, Email Systems
Match.com International

desk:  214-576-3228
home:  972-437-6272
mobile: 1-469-667-0395
msn: zac@zacbowling.com

-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: Tuesday, February 14, 2006 2:35 AM
To: Zac Bowling; Andreas Pflug
Cc: Zac Bowling; pgadmin-support@postgresql.org
Subject: RE: [pgadmin-support] Excessive GDI objects under WIN32


> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Zac Bowling
> Sent: 13 February 2006 22:50
> To: Andreas Pflug
> Cc: Zac Bowling; pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] Excessive GDI objects under WIN32
>
>
> The use of them isn't or not isn't a valid debate, but the over use of
> them is very valid. Anyways, I think I found the problem, and it
> appears to be inheirt to wxWidgets (had to rip it apart to find it).
> Some funny code comments around it as well. I'm going to send the
> patch in soon if I can fix it easily, but there might be a way to fix
> it in pgadmin without having to fix wxWidgets if anyone is interested.
> I'll reply later with more info when I get done and I get my build
> environment is setup correctly.

Yes, we're interested if it's a non-invasive (and appropriate) fix in pgAdmin. I don't entirely disagree with Andreas'
POV(I don't ever recall hearing of anyone running out of GDI's running pgAdmin), and I've certainly run it
simultaneouslywith VC++6 and VS 2k3 & 2k5 (at the same time - don't ask!!) without problems, but it doesn't hurt to
saveresources. 

Regards, Dave.