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

Issue 2086613003: Add fast-mode Uri class. (Closed)

Created:
4 years, 6 months ago by Lasse Reichstein Nielsen
Modified:
4 years, 5 months ago
Reviewers:
floitsch, sra1
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add fast-mode Uri class. Optimize parser and make it recognize a class of URIs that don't need extra handling: no escapes, no funny characters, already (nearly or completely) normalized. Have a class specifically for those URIs which retains the original input string without having allocate any further strings. R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/00090a0c7237b636a73f048e53966879e74ec55a Committed: https://github.com/dart-lang/sdk/commit/323ca7e410765f98a88d078c8c8c388fd972eba9

Patch Set 1 #

Total comments: 34

Patch Set 2 : Extract Uri interface class, address comments. #

Patch Set 3 : Fix bug in resolution when base path doesn't contain slash. #

Patch Set 4 : Tweak operator== #

Total comments: 25

Patch Set 5 : Address comments. Add more tests. Fix bug in old code found by tests. #

Patch Set 6 : Add changelog. Fix code depending on now fixed bug in Uri.resolve. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M CHANGELOG.md View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/compiler_helper.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tests/corelib/uri_test.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (4 generated)
Lasse Reichstein Nielsen
I see a >100% speedup on parsing all URIs occuring in import/export/part statements in the ...
4 years, 5 months ago (2016-06-27 11:06:57 UTC) #2
floitsch
LGTM. Are you sure that the tests cover both URI classes now? What about the ...
4 years, 5 months ago (2016-06-28 00:28:04 UTC) #3
Lasse Reichstein Nielsen
Restructured the file to extract a Uri interface instead of using the Uri class. Also ...
4 years, 5 months ago (2016-06-28 13:00:52 UTC) #4
Lasse Reichstein Nielsen
... or wait until I fix a bug in path-merging with a relative base path.
4 years, 5 months ago (2016-06-28 15:08:18 UTC) #5
Lasse Reichstein Nielsen
Fixed, now PTAL.
4 years, 5 months ago (2016-06-29 12:36:41 UTC) #6
floitsch
LGTM. https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart#newcode785 sdk/lib/core/uri.dart:785: // easier to do here because we already ...
4 years, 5 months ago (2016-06-29 23:41:48 UTC) #7
Lasse Reichstein Nielsen
Committed patchset #5 (id:80001) manually as 00090a0c7237b636a73f048e53966879e74ec55a (presubmit successful).
4 years, 5 months ago (2016-06-30 10:20:42 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart#newcode785 sdk/lib/core/uri.dart:785: // easier to do here because we already have ...
4 years, 5 months ago (2016-06-30 10:27:31 UTC) #10
Lasse Reichstein Nielsen
Committed patchset #6 (id:100001) manually as 323ca7e410765f98a88d078c8c8c388fd972eba9 (presubmit successful).
4 years, 5 months ago (2016-06-30 11:25:40 UTC) #12
floitsch
https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart File sdk/lib/core/uri.dart (right): https://codereview.chromium.org/2086613003/diff/60001/sdk/lib/core/uri.dart#newcode4373 sdk/lib/core/uri.dart:4373: int _startsWithData(String text, int start) { On 2016/06/30 10:27:31, ...
4 years, 5 months ago (2016-06-30 18:15:22 UTC) #13
sra1
4 years, 5 months ago (2016-07-05 01:52:38 UTC) #15
Message was sent while issue was closed.
This CL adds 9k to swarm and 23k to some angular2 dart2js code size benchmarks.
Is there a way to add fast paths without adding so much code?

I think the old URI class already cost too much code size for dart2js programs
(considering browsers already have various methods to process URIs). This CL
makes the dart:core URI tax even higher.

Powered by Google App Engine
This is Rietveld 408576698