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

Issue 2708893002: fasta: Cache relativizeUri(fileUri) on LibraryBuilder and ClassBuilder (or rather it's base class) (Closed)

Created:
3 years, 10 months ago by kustermann
Modified:
3 years, 10 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fasta: Cache relativizeUri(fileUri) on LibraryBuilder and ClassBuilder (or rather it's base class) This we we don't (re)calculate the same thing for each [ProcedureBuilder] and [FieldBuilder]. R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/974c1489938616db5194a52772cc29876fa37ccc

Patch Set 1 #

Patch Set 2 : Reorder import #

Total comments: 8

Patch Set 3 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -12 lines) Patch
M pkg/front_end/lib/src/fasta/builder/builder.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/builder/library_builder.dart View 1 2 3 chunks +8 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/builder/type_declaration_builder.dart View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart View 2 chunks +1 line, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart View 2 chunks +1 line, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/util/relativize.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
kustermann
3 years, 10 months ago (2017-02-21 13:51:00 UTC) #2
ahe
lgtm https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/fasta/builder/library_builder.dart File pkg/front_end/lib/src/fasta/builder/library_builder.dart (right): https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/fasta/builder/library_builder.dart#newcode55 pkg/front_end/lib/src/fasta/builder/library_builder.dart:55: LibraryBuilder._internal(this.fileUri, this.relativeFileUri) How about just having one constructor: ...
3 years, 10 months ago (2017-02-21 14:15:23 UTC) #3
ahe
And thank you!!!
3 years, 10 months ago (2017-02-21 14:29:49 UTC) #4
kustermann
Committed patchset #3 (id:40001) manually as 974c1489938616db5194a52772cc29876fa37ccc (presubmit successful).
3 years, 10 months ago (2017-02-22 14:40:18 UTC) #6
kustermann
Thanks https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/fasta/builder/library_builder.dart File pkg/front_end/lib/src/fasta/builder/library_builder.dart (right): https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/fasta/builder/library_builder.dart#newcode55 pkg/front_end/lib/src/fasta/builder/library_builder.dart:55: LibraryBuilder._internal(this.fileUri, this.relativeFileUri) On 2017/02/21 14:15:22, ahe wrote: > ...
3 years, 10 months ago (2017-02-22 14:40:28 UTC) #7
ahe
3 years, 10 months ago (2017-02-22 14:50:06 UTC) #8
Message was sent while issue was closed.
Thank you, Martin!

https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/f...
File pkg/front_end/lib/src/fasta/util/relativize.dart (right):

https://codereview.chromium.org/2708893002/diff/20001/pkg/front_end/lib/src/f...
pkg/front_end/lib/src/fasta/util/relativize.dart:13: final prefix =
base.toString();
On 2017/02/22 14:40:28, kustermann wrote:
> On 2017/02/21 14:15:22, ahe wrote:
> > String prefix = "$base";
> 
> I changed it because I saw some interpolate instructions in the flow graph,
> which is unnecesary work. Maybe it was just in unoptimized code.
> 
> Done.

Let's not forget this. I'm pretty sure we have a benchmark that checks if string
interpolation is fast, but it may only be optimized on dart2js.

Powered by Google App Engine
This is Rietveld 408576698