Bug 9296 - Performance improvement for svn-create-patch
Summary: Performance improvement for svn-create-patch
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-03 13:08 PDT by David Kilzer (:ddkilzer)
Modified: 2006-06-03 13:36 PDT (History)
0 users

See Also:


Attachments
Patch v1 (1.18 KB, patch)
2006-06-03 13:16 PDT, David Kilzer (:ddkilzer)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 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.
Comment 1 David Kilzer (:ddkilzer) 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.
Comment 2 Timothy Hatcher 2006-06-03 13:36:02 PDT
ddkilzer landed this in r14713.