Bug 9296

Summary: Performance improvement for svn-create-patch
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch v1 mjs: review+

David Kilzer (:ddkilzer)
Reported 2006-06-03 13:08:19 PDT
Once $indexPath is set (on the very first line returned), the three regular expressions inside the "if ($indexPath)" block of the diff() subroutine are applied to every single line of the resulting patch. This is unnecessary.
Attachments
Patch v1 (1.18 KB, patch)
2006-06-03 13:16 PDT, David Kilzer (:ddkilzer)
mjs: review+
David Kilzer (:ddkilzer)
Comment 1 2006-06-03 13:16:09 PDT
Created attachment 8682 [details] Patch v1 Patch v1 undefines the $indexPath variable so that the three regex replacement statements do not get run after the paths in each patch header are processed. Note that I didn't actually do any benchmarking; this seemed like an obvious performance win.
Timothy Hatcher
Comment 2 2006-06-03 13:36:02 PDT
ddkilzer landed this in r14713.
Note You need to log in before you can comment on or make changes to this bug.