Improve performance when building strings in template tags.

Review Request #9287 — Created Oct. 18, 2017 and submitted

Information

Review Board
release-3.0.x
1df7f43...

Reviewers

We had several template tags that were building strings through string
concatenation, which in Python isn't particularly fast or
memory-efficient when working with lots of data. The most notable of
these is when highlighting changed regions in diffs.

This change switches these to building lists of strings and joining them
for a final result, which should provide a small performance benefit.

Unit tests pass.

Manually tested that diffs did not break from this change.

Description From Last Updated

E501 line too long (80 > 79 characters)

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (a4eec91)