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

Issue 2011183004: Precompute `IgnoreInfo` in Scanner. (Closed)

Created:
4 years, 6 months ago by pquitslund
Modified:
4 years, 6 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Precompute `IgnoreInfo` in Scanner. The existing support for `ignore` filtering requires the error generator task to depend on parsed sources as input. As it happens, these parse results get flushed between the parse task and error generation, meaning that they need to be recomputed for EVERY source. This change moves ignore detection into the scanner which now produces a new result (akin to LineInfo) that can be used at error generation time (and will not be flushed). Local profiling shows this change making a roughly 10% improvement to overall analysis time for `flutter analyze`. Server-based analysis should enjoy a similar benefit. A few thoughts for further refinement: * can we NOT produce ignore results for sources whose errors we will not generate? * can we (and should we) improve the regexp-based approach? BUG= R=brianwilkerson@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/c77781d27e54fdf04721b8b5890576a91619e976

Patch Set 1 #

Total comments: 20

Patch Set 2 : review_fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -65 lines) Patch
M pkg/analyzer/lib/src/task/dart.dart View 1 9 chunks +101 lines, -63 lines 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 1 1 chunk +23 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
pquitslund
4 years, 6 months ago (2016-05-27 17:19:26 UTC) #2
pquitslund
Regarding unnecessary calculation of ignores, assuming we're not generating errors for SDK resources can we ...
4 years, 6 months ago (2016-05-27 17:57:40 UTC) #3
scheglov
lgtm https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/generated/source.dart File pkg/analyzer/lib/src/generated/source.dart (right): https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/generated/source.dart#newcode182 pkg/analyzer/lib/src/generated/source.dart:182: class IgnoreInfo { This could live in src/dart.dart ...
4 years, 6 months ago (2016-05-27 18:05:47 UTC) #4
Brian Wilkerson
lgtm https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/task/dart.dart File pkg/analyzer/lib/src/task/dart.dart (right): https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/task/dart.dart#newcode5503 pkg/analyzer/lib/src/task/dart.dart:5503: static IgnoreInfo calculateIgnores(String content, LineInfo info) { This ...
4 years, 6 months ago (2016-05-27 18:21:18 UTC) #5
pquitslund
Thanks! https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/generated/source.dart File pkg/analyzer/lib/src/generated/source.dart (right): https://codereview.chromium.org/2011183004/diff/1/pkg/analyzer/lib/src/generated/source.dart#newcode182 pkg/analyzer/lib/src/generated/source.dart:182: class IgnoreInfo { On 2016/05/27 18:05:47, scheglov wrote: ...
4 years, 6 months ago (2016-05-27 21:50:53 UTC) #6
pquitslund
4 years, 6 months ago (2016-05-27 21:52:25 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
c77781d27e54fdf04721b8b5890576a91619e976 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698