Page MenuHomePhabricator

Reduce the frequency of DOM scans to rebuild inlines when scrolling revisions
ClosedPublic

Authored by epriestley on May 15 2020, 4:35 PM.
Tags
None
Referenced Files
F15458289: D21261.id50628.diff
Sun, Mar 30, 10:36 PM
F15456470: D21261.id50627.diff
Sun, Mar 30, 9:57 AM
F15453328: D21261.id.diff
Sat, Mar 29, 10:57 AM
F15449352: D21261.diff
Fri, Mar 28, 9:39 AM
F15448368: D21261.diff
Fri, Mar 28, 4:29 AM
F15356653: D21261.id50627.diff
Mar 11 2025, 6:23 AM
F15331989: D21261.diff
Mar 7 2025, 3:48 PM
F15308720: D21261.diff
Mar 6 2025, 6:36 AM
Subscribers
None

Details

Summary

Ref T13513. See PHI1734, which raises a concern about the performance of large revisions near the 100-change threshold.

Currently, getInlines() is called whenever the scroll position transitions between two changesets, and it performs a relatively complicated DOM scan to lift inlines out of the document.

This shows up as taking a small but nontrivial amount of time in Firefox profiles and should be safely memoizable.

Test Plan
  • Under Firefox profiling, scrolled through a large revision.
  • Before change: getInlines() appeared as the highest-cost thing we're explicitly doing on profiles.
  • After change: getInlines() was no longer meaningfully represented on profiles.
  • Created inlines, edited inlines, etc. Didn't identify any broken behavior.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable