Page MenuHomePhabricator

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

Authored by epriestley on May 15 2020, 4:35 PM.
Referenced Files
Unknown Object (File)
Sat, Nov 25, 11:33 PM
Unknown Object (File)
Wed, Nov 15, 11:17 AM
Unknown Object (File)
Sep 7 2023, 3:14 AM
Unknown Object (File)
Sep 5 2023, 7:19 PM
Unknown Object (File)
Jul 22 2023, 3:18 PM
Unknown Object (File)
Jul 17 2023, 8:27 PM
Unknown Object (File)
Jul 17 2023, 4:56 PM
Unknown Object (File)
Jul 11 2023, 3:10 PM



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

rP Phabricator
Lint Not Applicable
Tests Not Applicable