Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Issue 485893008: Cautionary tale about optimizing path manipulation. (Closed)

Created:
6 years, 4 months ago by Bob Nystrom
Modified:
6 years, 4 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Cautionary tale about optimizing path manipulation. BUG=https://code.google.com/p/dart/issues/detail?id=20628 R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=39502

Patch Set 1 #

Total comments: 6

Patch Set 2 : Revise. #

Patch Set 3 : Add assert. #

Patch Set 4 : Comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -72 lines) Patch
M sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart View 1 2 chunks +7 lines, -18 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/io.dart View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/package.dart View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
D sdk/lib/_internal/pub/test/build/ignores_existing_compiled_js_files_test.dart View 1 1 chunk +0 lines, -54 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Bob Nystrom
Using substring() assumed the path was perfectly normalized. It wasn't. :(
6 years, 4 months ago (2014-08-21 22:28:58 UTC) #1
nweiz
https://codereview.chromium.org/485893008/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart File sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart (right): https://codereview.chromium.org/485893008/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart#newcode533 sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart:533: // Strip off the path to the package's root ...
6 years, 4 months ago (2014-08-22 00:00:52 UTC) #2
Bob Nystrom
I slapped together a little profile test case for this code and found: Current: 471ms ...
6 years, 4 months ago (2014-08-22 18:09:28 UTC) #3
nweiz
The changes you've made LGTM, but I think we've still got other copies of this ...
6 years, 4 months ago (2014-08-22 18:17:40 UTC) #4
Bob Nystrom
I think the other places are fine. Added one assert() to clarify that. https://codereview.chromium.org/485893008/diff/1/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart File ...
6 years, 4 months ago (2014-08-22 19:36:59 UTC) #5
nweiz
lgtm with the added comments we discussed offline.
6 years, 4 months ago (2014-08-22 19:46:15 UTC) #6
Bob Nystrom
6 years, 4 months ago (2014-08-22 19:50:40 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 manually as 39502 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698