Closed Bug 15416 Opened 26 years ago Closed 26 years ago

[perf] Massive performance problems

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: troy, Assigned: vidur)

References

()

Details

Attachments

(1 file)

33.92 KB, application/x-zip-compressed
Details
The attachment shows a HTML file I got from Kipp that takes a very long time to load. It's not layout, because most everything is marked 'display' 'none'. However, almost every element has three JavaScript handlers: onmouseout, onmouseover, and onclick. As the following information from Quantify indicates that's causing huge amounts of heap allocations. Can't we do some of this lazily instead of when building the content model? It seems that nsEventListenerManager::AddScriptEventListener is called 8,889 times (by the nsGenericHTMLElement::SetAttribute code) and that causes us to call JS_CompileUCFunctionForPrincipals and from then on we're doomed. Quantify shows 394,248 calls to HeapAlloc most of which are called by JS_malloc and are the result of processing the various scripts. There are also 17,785 calls to JS_ArenaRelease as well. I think the JavaScript code has some serious performance issues as well
URL: V0.html
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed with Vidur's change to delay evaluation of the script until it is needed. I confirmed that the page now loads very quickly
troy, would you like to verify this one ?
Status: RESOLVED → VERIFIED
According to troy, this's been fixed so marking verified.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: