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
Unknown Object (File)
Apr 16 2026, 2:33 PM
Unknown Object (File)
Mar 25 2026, 9:44 PM
Unknown Object (File)
Mar 4 2026, 9:17 PM
Unknown Object (File)
Mar 4 2026, 9:17 PM
Unknown Object (File)
Feb 20 2026, 4:02 PM
Unknown Object (File)
Feb 5 2026, 12:42 AM
Unknown Object (File)
Jan 13 2026, 3:25 PM
Unknown Object (File)
Jan 8 2026, 12:32 PM
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