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
F18112349: D21261.diff
Tue, Aug 12, 4:27 PM
F18102534: D21261.id50628.diff
Sat, Aug 9, 9:30 PM
F18092611: D21261.id.diff
Thu, Aug 7, 11:51 AM
F18088691: D21261.diff
Wed, Aug 6, 8:57 AM
F18078464: D21261.diff
Mon, Aug 4, 8:09 PM
F17791033: D21261.diff
Jul 24 2025, 9:23 PM
Unknown Object (File)
Jun 30 2025, 1:08 PM
Unknown Object (File)
Jun 30 2025, 8:46 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