Page MenuHomePhabricator

Improve Remarkup parsing performance for certain large input blocks
ClosedPublic

Authored by epriestley on Feb 4 2020, 10:37 PM.
Tags
None
Referenced Files
F19083156: D20968.id49964.diff
Tue, Dec 2, 12:31 PM
F18985323: D20968.id49962.diff
Mon, Nov 17, 12:59 PM
F18887023: D20968.id.diff
Nov 7 2025, 5:29 AM
F18876970: D20968.diff
Nov 6 2025, 5:07 AM
F18833117: D20968.diff
Oct 26 2025, 12:47 AM
F18784620: D20968.diff
Oct 13 2025, 1:38 PM
F18736271: D20968.id.diff
Oct 1 2025, 5:19 AM
F18734140: D20968.id.diff
Sep 30 2025, 10:48 PM
Subscribers
None

Details

Summary

Fixes T13487. In PHI1628, an install has a 4MB remarkup corpus which takes a long time to render. This is broadly expected, but a few reasonable improvements fell out of running it through the profiler.

Test Plan
  • Saw local cold-cache end-to-end rendering time drop from 12s to 4s for the highly secret input corpus.
  • Verified output has the same hashes before/after.
  • Ran all remarkup unit tests.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php
250–254

This piece was pretty wild. It meant "Are both blocks default blocks (plain old paragraphs)?" but tested that in a very convoluted way.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2020, 11:07 PM
This revision was automatically updated to reflect the committed changes.