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)
Tue, Jul 23, 3:19 AM
Unknown Object (File)
Fri, Jul 19, 5:48 AM
Unknown Object (File)
Wed, Jul 17, 5:23 AM
Unknown Object (File)
Mon, Jul 15, 12:59 PM
Unknown Object (File)
Sat, Jul 13, 5:02 PM
Unknown Object (File)
Fri, Jul 12, 10:05 AM
Unknown Object (File)
Mon, Jul 8, 5:43 PM
Unknown Object (File)
Sat, Jun 29, 2:38 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
Branch
perf1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24444
Build 33683: Run Core Tests
Build 33682: arc lint + arc unit