Closed Bug 218861 Opened 21 years ago Closed 9 months ago

nsImageWin: come up with a better way to limit GDI object usage

Categories

(Core Graveyard :: GFX: Win32, defect)

x86
Windows NT
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: darin.moz, Unassigned)

Details

(Keywords: perf)

come up with a better way to limit GDI object usage in nsImageWin.cpp. this is a spinoff from bug 216430.
Severity: normal → minor
Target Milestone: --- → Future
Possibly OS should be 'windows 95', as this is where most of the problems lie? Limiting under NT is pretty much a case of ensuring there are less than 10000 GDI objects in use. Would it be possible/sensible to (under 9x) use the amount of free system resources to decide whether to allocate a GDI object or not (GetFreeResources in rsrc32.dll returns a percentage)? It seems to me that any attempt to limit based solely on mozilla's status will fail, as other process do not allocate a constant or predictable amount of resources. (For example, mozilla could be limiting itself to an amount equivalent to 80% of the maximum GDI resources available, and then the user opens a few copies of a skinnable media player. If mozilla doesn't adapt and free some resources, then the system will crash). Apologies for wasting peoples' time if I'm just stating the obvious.
Keywords: perf
(In reply to comment #1) > Possibly OS should be 'windows 95', as this is where most of the problems lie? > Limiting under NT is pretty much a case of ensuring there are less than 10000 > GDI objects in use. Large numbers of GDI objects in use are not going to help any OS. The limit at 10000 is to make sure that you cannot easily crash the system with GDI handle bugs, but excessive usage will still cause notable performance degredation (not that the iTunes people care, they use 1300 just to *load* on Windows . . .)
bug 292051 from ArronM (:paper) seems to be a good proposal
Assignee: darin → win32
Target Milestone: Future → ---
Product: Core → Core Graveyard
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.