Fixing bug 98828. Cache a few nsSpaceManager objects to avoid spending 43%cvs ci -m ! of the time spent in PresShell::ProcessReflowCommand() in new and delete. r=dbaron@fas.harvard.edu, sr=waterson@netscape.com

This commit is contained in:
jst@netscape.com
2001-09-11 00:55:05 +00:00
parent 61ab96cf20
commit 89971a04be
13 changed files with 200 additions and 20 deletions

View File

@@ -674,7 +674,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
// only when there are actually floats to manage. Otherwise things
// like tables will gain significant bloat.
if (NS_BLOCK_SPACE_MGR & mState) {
nsSpaceManager* rawPtr = new nsSpaceManager(this);
nsSpaceManager* rawPtr = nsSpaceManager::Create(this);
if (!rawPtr) {
return NS_ERROR_OUT_OF_MEMORY;
}