Closed Bug 915178 Opened 11 years ago Closed 6 years ago

Opening find toolbar for the first time on a big page is really slow

Categories

(Toolkit :: Find Toolbar, defect, P5)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox25 + verified

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Keywords: regression)

BUILD: CURRENT NIGHTLY

STEPS TO REPRODUCE:

1)  Start browser
2)  Load 
    https://tbpl.mozilla.org/php/getParsedLog.php?id=27682765&tree=Try&full=1
    (or any browser-chrome full log from tbpl, if that link has expired).
3)  Hit Ctrl-F/Cmd-F

ACTUAL RESULTS: Browser freezes for 5-10s (depending on who's testing), then
                findbar appears.

EXPECTED RESULTS: Findbar just appears.

Additional information: Closing the findbar, then reopening it again is fast.  Closing the findbar, loading a new page (even a new full log), then opening the findbar is fast.  Opening a new tab, loading a full log in it, then opening the findbar is slow.

So it sounds like the findbar is doing _something_ once per tab that's slow.  Profiling suggests the something is lots of relayout, with tons of textrun construction.  But why only once per tab?

In particular, if I open a new tab, open the findbar while it's still showing about:blank, then close the findbar, load the long log and then open the findbar.... it's fast.

Bisect on nightlies and testing via local backout says this is a regression from bug 893446.
Looking through the patch in bug 893446, this jumps out at me:

  this.parentNode.style.position = "relative";

This will completely blow away and recreate the layout for all descendants of this.parentNode, which I bet includes the page content area for that tab.

And then we have:

   3.131 +                // We'd like to remove position:relative from this.parentNode,
   3.132 +                // but that unfortunately causes unnecessary repainting.

so we end up reframing this.parentNode only once: when the findbar is first opened.
We should just style the findbar's parent as "position: relative" up front, I think, when the tab is first created.
Bug 914180 should mean this is fixed on 25 now.
Keywords: verifyme
Reproduced in Nightly 2013-09-11.
Verified fixed FF 25b3 Win 7
Priority: -- → P5
Status: NEW → RESOLVED
Closed: 6 years ago
Keywords: verifyme
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.