Perf improvement: rebase analyis file once instead of multiple times

Review Request #4352 - Created Nov. 3, 2016 and submitted

Peiyu Wang
benjyw, ity, mateor, nhoward_tw, stuhood, wisechengyi, zundel

We have this outstanding issue to scan analysis file once, currently it does multiple scans, one per replaced pairs.

In #3962 new zinc analysis files are bigger, almost doubled in time in local testing. Therefore optimization becomes necessary.

From profiling, each of the following accounts for about 1/3 of the rebase total time:

  • file write
  • read() to iterate through lines
  • everything else (string replacement)

This PR cuts the time from the first two items by a factor of two since there are two scans. That nets 1/3 saving


  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Benjy Weinberger
Peiyu Wang
Stu Hood
Stu Hood
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Commited as 04afcc8476afd5bbff6326485bfb1f66b39b3d72