|
Home > Archive > Pgadmin > February 2006 > Excessive GDI objects under WIN32
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Excessive GDI objects under WIN32
|
|
| Zac Bowling 2006-02-13, 7:24 am |
| 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/
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Andreas Pflug 2006-02-13, 7:24 am |
| 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
| |
| Zac Bowling 2006-02-13, 11:24 am |
| 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 more then it seems nessiary. Visual Studio 2005 with over 30 tabs only requires 820 and it took me 31 IE windows with nothing but flash
and tons of form objects to get up to barely get to 1000. I can max out the 10,000 max pretty quick (even though you can increase the max in the registry it causes strange things to happen.) I'm not sure if its purely inside wxWidgets or its something uni
que 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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Zac Bowling 2006-02-13, 11:24 am |
| 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 SQL Server) is in there as well with 4x the number of windows and its running with only 320 GDI objects. Since we have a team of 10 postg
res servers (not currently replicated between each other) for an internal processing system, that I end up querying 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 coine
d 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 gdi objects and even running under 32bit wow mode, I ne
ver see anything like that, but for the 32bit challanged, it can be a 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 & #91;mailto:pgadmin@p
se-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
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
| |
| Andreas Pflug 2006-02-13, 8:25 pm |
| 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
| |
| Zac Bowling 2006-02-13, 8:25 pm |
|
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 go
ing 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.
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
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Dave Page 2006-02-14, 3:24 am |
|
> -----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.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
| |
| Zac Bowling 2006-02-14, 11:24 am |
| Hehe, yah. I'm runny pretty loaded here with VS2005, VS2003, VS6, VMWare, about 30 putty windows open at any time (half disconnected because 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 and about 30 firefox windows (to compare :-P), dreamweaver, a full blown j2ee server running cold fusion and jsp, and a postgres and SQL Server. Oh and you c
an't forget I'm running cygwin with the sshd server and the tools in my path, debug symbols for 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 wxWidgets at 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 to get 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 & #91;mailto:dpage@val
e-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 simultaneously with VC++6 an
d VS 2k3 & 2k5 (at the same time - don't ask!!) without problems, but it doesn't hurt to save resources.
Regards, Dave.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|
|
|
|
|