Bug 79159 - webkitpy: speed up frequently called but slow filesystem_mock functions
Summary: webkitpy: speed up frequently called but slow filesystem_mock functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-21 16:00 PST by Dirk Pranke
Modified: 2012-02-21 16:32 PST (History)
4 users (show)

See Also:


Attachments
Patch (9.19 KB, patch)
2012-02-21 16:04 PST, Dirk Pranke
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2012-02-21 16:00:43 PST
webkitpy: speed up hot filesystem_mock functions
Comment 1 Dirk Pranke 2012-02-21 16:04:24 PST
Created attachment 128068 [details]
Patch
Comment 2 Adam Barth 2012-02-21 16:13:48 PST
Comment on attachment 128068 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=128068&action=review

> Tools/ChangeLog:11
> +        slow.This patch speeds them up substantially, shaving 20 seconds
> +        off of the execution time.

Nice!  (nit: missing a space between "." and "This")
Comment 3 Eric Seidel (no email) 2012-02-21 16:17:29 PST
Comment on attachment 128068 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=128068&action=review

>> Tools/ChangeLog:11
>> +        off of the execution time.
> 
> Nice!  (nit: missing a space between "." and "This")

I'm surprised that this saves 20s...  Crazy.

> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:179
> +        return re.sub(re.escape(os.path.sep), self.sep, os.path.join(*comps))

compiling the regexp would help, no?
Comment 4 Dirk Pranke 2012-02-21 16:32:12 PST
Committed r108414: <http://trac.webkit.org/changeset/108414>