HomePhabricator

When a transaction adds more than 100 inline comments, include only the first…

Description

When a transaction adds more than 100 inline comments, include only the first 100 in email

Summary:
Ref T13195. An install had a user apply a transaction which added about 1,000 inline comments. Rendering the email for this transaction took a very long time because the context section for each comment must be highlighted separately.

We can make the highlighting faster (in this case, by porting the lexer to PHP) but it's also sort of silly to include more than 100 inlines in an email. These emails are likely to be truncated by outbound size rules at some point anyway. Instead, limit inlines rendered directly into email to the first 100 per transaction group.

Test Plan:
Set limit to 2, added 4 comments, viewed text and HTML emails:

Screen Shot 2018-09-04 at 10.40.37 AM.png (309×551 px, 24 KB)

Screen Shot 2018-09-04 at 10.41.03 AM.png (515×470 px, 57 KB)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13195

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