Closed
Bug 75435
Opened 24 years ago
Closed 16 years ago
Improve getElementById() performance for XML documents
Categories
(Core :: XML, defect, P4)
Core
XML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: hjtoi-bugzilla, Assigned: sicking)
References
Details
(Keywords: perf)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Copy the tactics (but not impl) from HTML document - make a hash table of IDs
for fast access.
Reporter | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.2
Reporter | ||
Updated•23 years ago
|
Priority: -- → P4
Reporter | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Reporter | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.3 → mozilla1.0
Reporter | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0 → mozilla0.9.9
Comment 2•23 years ago
|
||
getElementById() performance was fixed with the bug #14001 (closed on
2001-07-18), so we could close that one now.
/jc
Reporter | ||
Comment 3•23 years ago
|
||
It was fixed only for HTML. This bug is about XML. Other slow implementations of
getElementById() are XUL and possibly RDF.
Reporter | ||
Comment 4•23 years ago
|
||
This is not used in chrome nor are you normally going to be using this, futuring
for now to concentrate on more pressing issues.
Target Milestone: mozilla0.9.9 → Future
Updated•22 years ago
|
QA Contact: petersen → rakeshmishra
Reporter | ||
Comment 5•21 years ago
|
||
Johnny, did you actually do this recently?
Comment 6•21 years ago
|
||
No, not really. I consolidated some of the code that does the ID matching with
the HTML code, but speed wise we're still the same. We'll need a hashtable or
somesuch behind this to make it fast, and that's still not done.
Updated•21 years ago
|
QA Contact: rakeshmishra → ashishbhatt
Comment 7•18 years ago
|
||
I've noticed mozilla's getElementById is significantly slower then opera and safari. It's faster then IE 6.0, but only a little. It sure would be nice if it could be speed up to match the other two browsers.
This moves the id hash from nsHTMLDocument to nsDocument. As I tried to leave all the logic dealing with "name" in nsHTMLDocument, the implementation details of the hash are exposed to inheritors of nsDocument.
Comment 10•17 years ago
|
||
This is responsible for a lot of the slowness in SVG, so setting blocking1.9? Any chance the patch could be finished off in time Jonas?
Flags: blocking1.9?
Comment 11•17 years ago
|
||
(In reply to comment #10)
> This is responsible for a lot of the slowness in SVG, so setting blocking1.9?
> Any chance the patch could be finished off in time Jonas?
Do you have testcases which show getElementById being the issue in profiles? I'd like to see them - usually my profiles of SVG show cairo and the X server being the problem points.
Comment 12•17 years ago
|
||
Sure. Basically anything with lots of gradient/pattern/clipPath/etc. references in it. See bug 336647 comment 5, for example, where I note the time spent under MatchElementId is almost as long as the same as the time spent under Paint! I remember going through some of the slower SVGs on openclipart.org and MatchElementId consistently showing up high in profiling, so that would be a good place to start.
Assignee | ||
Comment 13•17 years ago
|
||
I'm not going to have time to work on this :(
However it should be possible to do this in a safe enough way I think, so if someone can come up with such a patch I should be able to review. It would have to happen within a few weeks though.
Comment 14•17 years ago
|
||
(In reply to comment #12)
> Sure. Basically anything with lots of gradient/pattern/clipPath/etc. references
> in it. See bug 336647 comment 5, for example, where I note the time spent under
> MatchElementId is almost as long as the same as the time spent under Paint! I
> remember going through some of the slower SVGs on openclipart.org and
> MatchElementId consistently showing up high in profiling, so that would be a
> good place to start.
Paint server lookup used to be a horrible abuser of MatchElementId, true, but that was fixed in the rewrite of the SVG rendering code since FF1.5/2.0. Have you seen this behavior reappear in current builds?
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9-
I fixed this in bug 344258. XML documents (in fact all documents) now use the same logic as HTML documents (which was moved to nsDocument).
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•