Closed Bug 284716 Opened 20 years ago Closed 20 years ago

Create DDBs in nsImageWin::Optimize

Categories

(Core Graveyard :: GFX: Win32, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: paper, Assigned: paper)

References

Details

(Keywords: fixed-aviary1.0.5, fixed1.7.9, perf)

Attachments

(1 file)

This bug will switch back to creating DDBs for Win2k, WinXP and later versions. Win95/98/NT will remain using DIBs and Min-Size-Before-Optimizing limits until a proper solution is found (Bug 218861) Bug 277762 Comment 30 has stats to prove DDBs are faster Bug 205893 has caused some major slowdowns because it switched nsImageWin::Optimize from DDBs to DIBs. The move had something to do with resource usage. Apparently DIBs use less GDI resources. However, DDBs are much much faster than DIBs. This can be seen on Bug 277762, Bug 255648, Bug 278614, Bug 260676, and Bug 244555. Bug 244555 even identifies Bug 205893 as the culprit, however, I decided to create a new bug because this patch could belong to any one of these bugs.
As stated, for Win95/98/ME/NT, optimize only if size is > 0x20000, and optimize using DIB (CreateDIBSection). For Win2k/XP/2003/later, optimize using DDB (CreateDIBitmap). Needed to differentiate between NT and 2k, so I brought in OSVERSIONINFO.dwMajorVersion as a static variable (like gPlatform). See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/osversioninfo_str.asp
Attachment #176232 - Flags: superreview?(tor)
Attachment #176232 - Flags: review?(pavlov)
Comment on attachment 176232 [details] [diff] [review] Create DDBs for Win2k/XP The two trailing spaces in the code I added will be removed.
Another perf test (The other one was Bug 277762 Comment 30) nVidia FX5500;Win2k http://www.world-direct.at/mozilla/dhtml/75121/anim-test.htm 32bit/16bit color Before 4469/2375 After 1578/1578
Comment on attachment 176232 [details] [diff] [review] Create DDBs for Win2k/XP we may see a few new bugs, but i think this should help perf a lot.
Attachment #176232 - Flags: review?(pavlov) → review+
Attachment #176232 - Flags: superreview?(tor) → superreview+
Checking in nsImageWin.cpp; /cvsroot/mozilla/gfx/src/windows/nsImageWin.cpp,v <-- nsImageWin.cpp new revision: 3.140; previous revision: 3.139 done Checking in nsImageWin.h; /cvsroot/mozilla/gfx/src/windows/nsImageWin.h,v <-- nsImageWin.h new revision: 3.61; previous revision: 3.60 done
I've applied the patch to my build and it really does speed up! When this patch is applied long pages with lots of images do not render correcly. Please browse with a empty cache to http://gathering.tweakers.net/forum/list_messages/1015049/2 if the page is fully loaded (may take a while) open the 4th page ( http://gathering.tweakers.net/forum/list_messages/1015049/3 ) if is fully loaded scroll in up and down or load the 3rd page again, the content is totally overlapping and not refreshing anymore.
Ger, what Windows versions are you running, and what video card do you have?
(In reply to comment #7) > Ger, what Windows versions are you running, and what video card do you have? Sorry, I'm not able to reproduce it anymore myself. Don't get it, I checked it several times with complete clean compiles and with and without the this patch before posting a comment here. Sorry and ignore my comment. I'll keep an eye out for my above mentioned behavure. (I'm using winXP and Geforce/5200)
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050305 Firefox/1.0+ Fantastic work! On my Win2k/nvidia pc this patch has helped scrolling under certain circumstances immensely. Jumping between tabs seems faster, scrolling on a number of sites shows marked improvement, memory usage seems to have been reduced (~46MB for 14 tabs in 20050304, compared to ~40MB for the same 14 tabs in 20050305), some of the DHTML regressions are sped up, etc There's still some way to go before all the scrolling problems are sorted out but for me I consider this patch to be a major fix for win2kxp platforms.
Bug 205893 / bug 204374 is back on WinXP due to this performance fix. Are you planning to fix those bugs in some other way? If not, I think you should back out this fix.
Jesse, please file a new bug. Those two bugs are riddled with confusion. Bug 204374 was originally for Win9x, which has a small GDI resource limit, whereas XP doesn't. The bug then morphed into talking about leaks, and other subjects. When you create a new bug, please include that you are on XP, your video card, video mode, and a testcase.
Ok. I filed bug 284978.
Er... what's with the printf in non-debug code?
Please ignore comment 13.
Keywords: perf
Blocks: x-files
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Blocks: 244582
*** Bug 241642 has been marked as a duplicate of this bug. ***
Depends on: 290510
No longer depends on: 290510
Blocks: 290510
No longer blocks: 290510
Depends on: 290510
Comment on attachment 176232 [details] [diff] [review] Create DDBs for Win2k/XP requesting branch approval as this fixes bug 289864
Attachment #176232 - Flags: approval1.7.9?
Attachment #176232 - Flags: approval-aviary1.0.5?
Attachment #176232 - Flags: approval1.7.9?
Attachment #176232 - Flags: approval1.7.9+
Attachment #176232 - Flags: approval-aviary1.0.5?
Attachment #176232 - Flags: approval-aviary1.0.5+
Comment on attachment 176232 [details] [diff] [review] Create DDBs for Win2k/XP a- after chatting with Asa. The regression fixes start dragging in too many patches for confidence in the branch.
Attachment #176232 - Flags: approval1.7.9-
Attachment #176232 - Flags: approval1.7.9+
Attachment #176232 - Flags: approval-aviary1.0.5-
Attachment #176232 - Flags: approval-aviary1.0.5+
I think we should take this and the follow up patches on the branch.
Comment on attachment 176232 [details] [diff] [review] Create DDBs for Win2k/XP OK, we do want this one, but we also want all the regression fixes.
Attachment #176232 - Flags: approval1.7.9-
Attachment #176232 - Flags: approval1.7.9+
Attachment #176232 - Flags: approval-aviary1.0.5-
Attachment #176232 - Flags: approval-aviary1.0.5+
Fix checked into mozilla1.7 and aviary branches
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: