473,385 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

lots of GDI objects

Hi,

i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about
there.
Now when I scroll up and down repeatedly using the vertical scrollbar, I see
the number of GDI object grow rapidly. Now and then it drops again to about
60 which is reasonable.When this number reaches 10.000, all of a sudden, it
turns into 4.294.964.397 (more or less).
Running the garbage collector manually does not help anymore then.
I also noticed that when I run the garbage collector (manually) *before* the
number reaches 10.000 this problem does not occur.
What is going wrong here ? I'm not doing any custom drawing, I don't even
use another backcolor, font or whatever. Why does it allocate so many GDI
objects. If I wrote something like a ListView, I would cache some or all of
the pens and brushes, as in most cases all the rows have similar properties
(color, font, ...).

I must be missing something. Anybody a clue ?
Thanks in advance.
Greetings,
Bram.
Nov 16 '05 #1
10 3441
> i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about there.


Which tool are you using to determine the number of GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk

Nov 16 '05 #2
Hi,

I'm using the task manager. Is it that inaccurate ?

Regards,

Bram.
"codymanix" <no****************@gmx.net> wrote in message
news:uQ**************@TK2MSFTNGP11.phx.gbl...
i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry

about
there.


Which tool are you using to determine the number of GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk

Nov 16 '05 #3
> I'm using the task manager. Is it that inaccurate ?
No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #4
> I'm using the task manager. Is it that inaccurate ?
No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
Nov 16 '05 #5
Hi,

There's a GDI Objects column for every process in task manager, I suppose
they are what they are.
Never seen anything wrong when there was nothing wrong.
Over years I have found these numbers very accurate. Why shouldn't they not
be.
I suppose there might be a small bug in Task Manager, or in some kernel
function causing the number to go insane when it passes 10.000. Which
doesn't mean there is actually going something wrong in the GDI system.

But this doesn't explain why my listview is rapidly allocating so many gdi
objects while scrolling.

Cheears,

Bram

"codymanix" <no****************@gmx.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I'm using the task manager. Is it that inaccurate ?

No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk

Nov 16 '05 #6
Hello,

I experienced the same problem but on a VB6 application, I guess that
internally no real sharing of resources is made, the thing is that the
applications crashes when reaches 10.000 GDI objects... That's why I like
most Visual C++...

Best regards,
Relu.

"Bram" <bv*****@nospam.skynet.be> wrote in message
news:40**********************@news.skynet.be...
Hi,

i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about there.
Now when I scroll up and down repeatedly using the vertical scrollbar, I see the number of GDI object grow rapidly. Now and then it drops again to about 60 which is reasonable.When this number reaches 10.000, all of a sudden, it turns into 4.294.964.397 (more or less).
Running the garbage collector manually does not help anymore then.
I also noticed that when I run the garbage collector (manually) *before* the number reaches 10.000 this problem does not occur.
What is going wrong here ? I'm not doing any custom drawing, I don't even
use another backcolor, font or whatever. Why does it allocate so many GDI
objects. If I wrote something like a ListView, I would cache some or all of the pens and brushes, as in most cases all the rows have similar properties (color, font, ...).

I must be missing something. Anybody a clue ?
Thanks in advance.
Greetings,
Bram.

Nov 16 '05 #7
Hi,

There's a GDI Objects column for every process in task manager, I suppose
they are what they are.
Never seen anything wrong when there was nothing wrong.
Over years I have found these numbers very accurate. Why shouldn't they not
be.
I suppose there might be a small bug in Task Manager, or in some kernel
function causing the number to go insane when it passes 10.000. Which
doesn't mean there is actually going something wrong in the GDI system.

But this doesn't explain why my listview is rapidly allocating so many gdi
objects while scrolling.

Cheears,

Bram

"codymanix" <no****************@gmx.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I'm using the task manager. Is it that inaccurate ?

No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk

Nov 16 '05 #8
Hello,

I experienced the same problem but on a VB6 application, I guess that
internally no real sharing of resources is made, the thing is that the
applications crashes when reaches 10.000 GDI objects... That's why I like
most Visual C++...

Best regards,
Relu.

"Bram" <bv*****@nospam.skynet.be> wrote in message
news:40**********************@news.skynet.be...
Hi,

i'm experiencing a very weird problem here.
I've got a ListView, 4 columns and about 300 items. Nothing to worry about there.
Now when I scroll up and down repeatedly using the vertical scrollbar, I see the number of GDI object grow rapidly. Now and then it drops again to about 60 which is reasonable.When this number reaches 10.000, all of a sudden, it turns into 4.294.964.397 (more or less).
Running the garbage collector manually does not help anymore then.
I also noticed that when I run the garbage collector (manually) *before* the number reaches 10.000 this problem does not occur.
What is going wrong here ? I'm not doing any custom drawing, I don't even
use another backcolor, font or whatever. Why does it allocate so many GDI
objects. If I wrote something like a ListView, I would cache some or all of the pens and brushes, as in most cases all the rows have similar properties (color, font, ...).

I must be missing something. Anybody a clue ?
Thanks in advance.
Greetings,
Bram.

Nov 16 '05 #9
There's a known bug in the performance counter object for GDI handles (which
is used by taskman), once the max value (10000)is exceeded it returns a
bogus number.

Willy.
"Bram" <bv*****@nospam.skynet.be> wrote in message
news:40**********************@news.skynet.be...
Hi,

There's a GDI Objects column for every process in task manager, I suppose
they are what they are.
Never seen anything wrong when there was nothing wrong.
Over years I have found these numbers very accurate. Why shouldn't they
not
be.
I suppose there might be a small bug in Task Manager, or in some kernel
function causing the number to go insane when it passes 10.000. Which
doesn't mean there is actually going something wrong in the GDI system.

But this doesn't explain why my listview is rapidly allocating so many gdi
objects while scrolling.

Cheears,

Bram

"codymanix" <no****************@gmx.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
> I'm using the task manager. Is it that inaccurate ?

No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk


Nov 16 '05 #10
There's a known bug in the performance counter object for GDI handles (which
is used by taskman), once the max value (10000)is exceeded it returns a
bogus number.

Willy.
"Bram" <bv*****@nospam.skynet.be> wrote in message
news:40**********************@news.skynet.be...
Hi,

There's a GDI Objects column for every process in task manager, I suppose
they are what they are.
Never seen anything wrong when there was nothing wrong.
Over years I have found these numbers very accurate. Why shouldn't they
not
be.
I suppose there might be a small bug in Task Manager, or in some kernel
function causing the number to go insane when it passes 10.000. Which
doesn't mean there is actually going something wrong in the GDI system.

But this doesn't explain why my listview is rapidly allocating so many gdi
objects while scrolling.

Cheears,

Bram

"codymanix" <no****************@gmx.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
> I'm using the task manager. Is it that inaccurate ?

No I was just curious. But how can you be sure they are GDI objects?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk


Nov 16 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mickel Grönroos | last post by:
Hi everybody, This is a question about Tkinter.Canvases and performance: I am writing a Tkinter application that among other things contains a number of Tkinter.Canvases that in turn hold...
10
by: AlexS | last post by:
Hi, I wonder if anybody can comment if what I see is normal in FW 1.1 and how to avoid this. I have .Net assembly, which creates literally thousands of temporary strings and other objects...
5
by: Simon | last post by:
Hi all, I'm hoping that someone could help with the following general question: I'm making a website that manages beta releases of software. It does various things like store bugs, comments,...
18
by: Matthias Kaeppler | last post by:
Hi, in my program, I have to sort containers of objects which can be 2000 items big in some cases. Since STL containers are based around copying and since I need to sort these containers quite...
2
by: Chris | last post by:
Hi, I am building a single webform/webpage asp.net application using VB.NET. I have created lots of classes for this web application. On page load I use a facade controller pattern class to...
8
by: vvenk | last post by:
Hello: I just wrote my first ASP.Net application. It worked fine on my machine and when I put into production, the ASP.Net process reaches 50% quite fast and then the system does not work...
2
by: wlevine | last post by:
Can someone give me an example of how to construct an array of objects? for example, I have: function objFacility(id,name,adr,city,state,zip) { this.id = id this.name=name this.adr=adr...
8
by: rpsetzer | last post by:
I have to create a big web application and I was thinking of using a data layer. For each entity in the database, I'll define a class that maps the table structure, having sub-objects for each...
10
by: Tigger | last post by:
I have a method that is passed two objects and it needs to return an object that represents those two objects multiplied together. public object Multiply(object a, object b) { return a * b; }...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.