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
F18807833: D21261.diff
Oct 19 2025, 3:30 AM
F18757231: D21261.id.diff
Oct 5 2025, 4:17 PM
F18745463: D21261.id50628.diff
Oct 3 2025, 7:11 AM
F18704850: D21261.id.diff
Sep 28 2025, 9:06 AM
F18704293: D21261.diff
Sep 28 2025, 6:59 AM
F18645543: D21261.id.diff
Sep 19 2025, 8:01 AM
F18629742: D21261.diff
Sep 16 2025, 9:46 AM
F18612552: D21261.id.diff
Sep 14 2025, 9:13 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