HomePhabricator

Use the changeset parse cache when rendering inline comments in mail

Description

Use the changeset parse cache when rendering inline comments in mail

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.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13202

Differential Revision: https://secure.phabricator.com/D19721

Details

Provenance
epriestleyAuthored on Oct 1 2018, 5:00 PM
epriestleyPushed on Oct 1 2018, 8:08 PM
Reviewer
amckinley
Differential Revision
D19721: Use the changeset parse cache when rendering inline comments in mail
Parents
rPdbf2302b6c67: Fix self-cancelling typo
Branches
Unknown
Tags
Unknown
Tasks
T13202: Plans: 2018 Week 38-40 Bonus Content
Build Status
Buildable 20930
Build 28450: Run Core Tests