Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(885)

Issue 7336043: try precompiling regexps to speed up bench_graph_svg.py (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by epoger
Modified:
11 years, 4 months ago
Reviewers:
benchen
CC:
skia-review_googlegroups.com, benchen, bungeman, rmistry, EricB
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

try precompiling regexps to speed up bench_graph_svg.py Committed: https://code.google.com/p/skia/source/detail?r=7741

Patch Set 1 #

Patch Set 2 : made_all_regexes_constants #

Total comments: 8

Patch Set 3 : final_touches #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -29 lines) Patch
M bench/bench_util.py View 1 2 3 chunks +41 lines, -29 lines 0 comments Download

Messages

Total messages: 6
epoger
I haven't named a reviewer because so far, this actually isn't worth committing. It takes ...
11 years, 4 months ago (2013-02-14 15:43:04 UTC) #1
epoger
Ready for review at patchset 2. https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py File bench/bench_util.py (right): https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py#newcode33 bench/bench_util.py:33: SETTING_RE_COMPILED = re.compile(SETTING_RE) ...
11 years, 4 months ago (2013-02-14 16:11:21 UTC) #2
benchen
LGTM for this round. Thanks for trying on compiled RE. https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py File bench/bench_util.py (right): https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py#newcode19 ...
11 years, 4 months ago (2013-02-14 17:43:31 UTC) #3
epoger
Will commit at patchset 3... https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py File bench/bench_util.py (right): https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py#newcode19 bench/bench_util.py:19: SETTING_RE = '([^\s=]+)(?:=(\S+))?' On ...
11 years, 4 months ago (2013-02-14 18:34:25 UTC) #4
epoger
https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py File bench/bench_util.py (right): https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py#newcode180 bench/bench_util.py:180: bench_dic, layout_dic, representation) On 2013/02/14 18:34:25, epoger wrote: > ...
11 years, 4 months ago (2013-02-14 18:50:59 UTC) #5
benchen
11 years, 4 months ago (2013-02-14 19:55:12 UTC) #6
Message was sent while issue was closed.
https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py
File bench/bench_util.py (right):

https://codereview.appspot.com/7336043/diff/3001/bench/bench_util.py#newcode180
bench/bench_util.py:180: bench_dic, layout_dic, representation)
Really???!!! So that means all the time was wasted on trying to find an RE match
on lines that don't have a match.
On 2013/02/14 18:51:00, epoger wrote:
> On 2013/02/14 18:34:25, epoger wrote:
> > On 2013/02/14 17:43:31, benchen wrote:
> > > Just a thought: each line can be either per-tile or not, but not both. If
we
> > use
> > > non-RE ways to differentiate the two first (say, if the line contains '
out
> of
> > > '), we can potentially cut the time almost in half.
> > 
> > That seems promising... unfortunately, the test data I have checked in for
the
> > self-test is entirely per-tile.  I don't want to go messing with that code
> until
> > we can confirm that both kinds of lines are stil dealt with properly.
> > 
> > $ grep -v 'out of'
> >
>
tools/tests/benchgraphs/Skia_Shuttle_Ubuntu12_ATI5770_Float_Bench_32/raw-bench-data/*
> > | grep -v 'running bench' | grep -v 'bench_pictures' | wc -l
> > 0
> 
> Holy mackerel!  I took a stab at this, just to see if the time savings would
be
> significant (even though I don't have all the test data I want yet)... and the
> time dropped from 38 seconds to 3 seconds!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b