Closed Bug 1435217 Opened 7 years ago Closed 7 years ago

Make pocket better behaved at inserting itself in windows

Categories

(Firefox :: Pocket, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The current behaviour causes style flushes because we insert a stylesheet after the first style flush has already happened.

Also, there's a tremendous amount of overdue cleanup post-photon.
FWIW, bug 1435214 should avoid the extra full restyle on stylo-chrome.
(In reply to Emilio Cobos Álvarez [:emilio] from comment #1)
> FWIW, bug 1435214 should avoid the extra full restyle on stylo-chrome.

But it would still be good to merge restyles as much as possible :)
Comment on attachment 8947811 [details]
Bug 1435217 - remove vestiges of dead pocket toolbar/panel button and always-hidden bookmarks menu button panel menu item,

https://reviewboard.mozilla.org/r/217510/#review223364

Thank you so much!
Attachment #8947811 - Flags: review?(jaws) → review+
Attachment #8947812 - Flags: review?(adw) → review?(jaws)
Comment on attachment 8947812 [details]
Bug 1435217 - move pocket initialization to delayed-browser-startup,

https://reviewboard.mozilla.org/r/217512/#review223366
Attachment #8947812 - Flags: review?(jaws) → review+
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/dd701ae8ff39
remove vestiges of dead pocket toolbar/panel button and always-hidden bookmarks menu button panel menu item, r=jaws
https://hg.mozilla.org/integration/autoland/rev/ab0557eb4315
move pocket initialization to delayed-browser-startup, r=jaws
https://hg.mozilla.org/mozilla-central/rev/dd701ae8ff39
https://hg.mozilla.org/mozilla-central/rev/ab0557eb4315
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Hmm... if it really removes one full document restyle, there should probably be an improvement of ~2%, but it seems nothing show up... maybe we still have a restyle for some other reason. I'll profile again on Monday and see what's going on.
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #9)
> Hmm... if it really removes one full document restyle, there should probably
> be an improvement of ~2%, but it seems nothing show up... maybe we still
> have a restyle for some other reason. I'll profile again on Monday and see
> what's going on.

We delayed the insertion of the stylesheet and other stuff, so I somewhat expect the style flush to occur later - but that should be after first paint, which means it should have improved tpaint and maybe ts_paint. I tried to verify this locally but gave up because of the profiler not dealing well with local builds on macOS.
So, maybe the optimization is too small to be noticed.

From my local testing, this change may have made the time restyle takes in load event handler down from 4.6ms to 2.8ms in a 160ms~180ms result, so it's roughly just 1%. It may not be that significant.

But, this does make a big difference for stylo-chrome. The time taken by that restyle is down from 12ms to 1.7ms! It posts a big full document restyle after MozAfterPaint, but supposedly that doesn't affect tpaint result?

Anyway, that big full document restyle should eventually be eliminated by bug 1435214.

Thanks for fixing this.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: