Closed
Bug 501375
Opened 15 years ago
Closed 15 years ago
nsHTMLTableAccessible::HasDescendant is much slower than it should be
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
8.35 KB,
patch
|
MarcoZ
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Obvious issues: 1) It forces a walk over all of the table's kids by getting .length on the list. For cases when the table actually _has_ a kid of the sort this algorithm is looking for, this is wholly unnecessary. 2) It has a bizarre check for whether the first item of the list is the table itself. This can't ever happen. 3) It does some weird string operations instead of just having the callers pass in an NS_LITERAL_STRING(). Issue #1 is by far the most important, of course.
Assignee | ||
Comment 1•15 years ago
|
||
not tested, it would be nice to get mochitests from bug 495388.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•15 years ago
|
||
That patch changed behavior such that if aAllowEmpty is false and the first kid is empty the function will return false where it used to return true....
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2) > That patch changed behavior such that if aAllowEmpty is false and the first kid > is empty the function will return false where it used to return true.... Ah, I see, thank you for the catch.
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #2) > That patch changed behavior such that if aAllowEmpty is false and the first kid > is empty the function will return false where it used to return true.... Sorry I was quick to say I see. Do you mean the case when length > 1?
Reporter | ||
Comment 5•15 years ago
|
||
Er, yes. Sorry, forgot to mention that.
Assignee | ||
Comment 6•15 years ago
|
||
Attachment #386676 -
Attachment is obsolete: true
Attachment #386795 -
Flags: superreview?(bzbarsky)
Attachment #386795 -
Flags: review?(marco.zehe)
Reporter | ||
Updated•15 years ago
|
Attachment #386795 -
Flags: superreview?(bzbarsky) → superreview+
Comment 7•15 years ago
|
||
Comment on attachment 386795 [details] [diff] [review] patch2 r=me, thanks!
Attachment #386795 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 8•15 years ago
|
||
checked in on 1.9.2 - http://hg.mozilla.org/mozilla-central/rev/7ed7057a36c7
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•