Summary: | Web Inspector: Extremely slow DOM search in GMail | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexander Pavlov (apavlov) <apavlov> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Alexander Pavlov (apavlov) <apavlov> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, apavlov, bweinstein, commit-queue, eric, joepeck, keishi, loislo, mathias, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Alexander Pavlov (apavlov)
2011-03-01 04:08:20 PST
Created attachment 84217 [details]
[PATCH] Suggested solution
Created attachment 84220 [details]
[PATCH] Avoid storing refs to normalHTML in nodes not participating in search highlighting
Comment on attachment 84220 [details] [PATCH] Avoid storing refs to normalHTML in nodes not participating in search highlighting View in context: https://bugs.webkit.org/attachment.cgi?id=84220&action=review > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1451 > text = text.substring(match.index + 1); while (match) { 1449 highlightSearchResult(this.listItemElement, offset + match.index, match[0].length); Could we replace quadratic algorithm here with a linear one? > Source/WebCore/inspector/front-end/utilities.js:1023 > +function setAtTextOffset(textNodeIterator, relativeOffset) This should be a method on the iterator. > Source/WebCore/inspector/front-end/utilities.js:1062 > + var textNodeIterator = new OrderedNodeSnapshotIterator(document.evaluate(".//text()", element, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)); Consider inlining the iterator. Looks like a loop would work equally well here. Created attachment 84231 [details]
[PATCH] Comments addressed, please re-review
Comment on attachment 84231 [details] [PATCH] Comments addressed, please re-review View in context: https://bugs.webkit.org/attachment.cgi?id=84231&action=review > Source/WebCore/inspector/front-end/utilities.js:1034 > + var previousOffset = 0; This is not used. Please remove. Landed with the unused var fix. Committing to http://svn.webkit.org/repository/webkit/trunk ... M Source/WebCore/ChangeLog M Source/WebCore/inspector/front-end/ElementsPanel.js M Source/WebCore/inspector/front-end/ElementsTreeOutline.js M Source/WebCore/inspector/front-end/utilities.js Committed r80003 http://trac.webkit.org/changeset/80003 might have broken GTK Linux 64-bit Debug The following tests are not passing: loader/reload-subresource-when-type-changes.html |