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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2917183003: update the analyzer and analysis server perf tags (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index b4bac8b4eb193b553bdad46a7077179bb23856c6..62894326be018b30c0a6bdfc17e5d06b7c6266fc 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -31,6 +31,7 @@ import 'package:analyzer/src/lint/registry.dart' as linter;
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/task/driver.dart';
import 'package:front_end/src/base/api_signature.dart';
import 'package:front_end/src/base/performace_logger.dart';
import 'package:front_end/src/incremental/byte_store.dart';
@@ -978,9 +979,14 @@ class AnalysisDriver implements AnalysisDriverGeneric {
// If we don't need the fully resolved unit, check for the cached result.
if (!withUnit) {
- List<int> bytes = _byteStore.get(key);
- if (bytes != null) {
- return _getAnalysisResultFromBytes(file, signature, bytes);
+ AnalysisResult result = driverCacheTag.makeCurrentWhile(() {
+ List<int> bytes = _byteStore.get(key);
scheglov 2017/06/04 00:30:44 Maybe wrap with measuring only this statement. Als
+ if (bytes != null) {
+ return _getAnalysisResultFromBytes(file, signature, bytes);
+ }
+ });
+ if (result != null) {
+ return result;
}
}

Powered by Google App Engine
This is Rietveld 408576698