Page MenuHomePhabricator

Use the changeset parse cache when rendering inline comments in mail
ClosedPublic

Authored by epriestley on Oct 1 2018, 5:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 26, 5:57 AM
Unknown Object (File)
Oct 10 2024, 6:20 PM
Unknown Object (File)
Oct 10 2024, 2:01 AM
Unknown Object (File)
Sep 30 2024, 9:37 PM
Unknown Object (File)
Sep 24 2024, 3:20 AM
Unknown Object (File)
Sep 9 2024, 1:02 PM
Unknown Object (File)
Sep 6 2024, 4:07 AM
Unknown Object (File)
Sep 1 2024, 9:41 PM
Subscribers
None

Details

Summary

Ref T13202. See PHI903 and PHI894. When a bot leaves 100 inline comments on the same file and the revision has a 30-member recipient list, we currently highlight the file 3000 times when building mail.

Instead, engage the parse cache so we highlight it once and reuse the cache 2,999 times.

Test Plan
  • Added debugging code to stop after mail generation and show cache hits/misses.
    • Left a bunch of inlines in a file.
    • Ran the worker with bin/worker execute --id ....
    • Before change: saw 4 comments x 2 recipients = 8 cache misses
    • After change: saw 8 cache hits (cache already filled from web UI rendering)
  • Removed debugging code, ran worker to completion.
  • Used bin/mail show-outbound --id ... --dump-html to inspect resulting mail, saw no functional differences.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable