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

Unified Diff: pkg/analysis_server/lib/src/domain_completion.dart

Issue 867023002: cache completion performance by default (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 11 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/completion_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_completion.dart
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index 08a904343a18aa47153b8ae0f35dfe7ef8e397cf..e6a57b456717bf2bc00a81943dae91f842397b3e 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -58,7 +58,7 @@ class CompletionDomainHandler implements RequestHandler {
/**
* The maximum number of performance measurements to keep.
*/
- static const int performanceListMaxLength = 0;
+ static const int performanceListMaxLength = 50;
/**
* Performance for the last priority change event.
@@ -204,7 +204,6 @@ class CompletionDomainHandler implements RequestHandler {
void recordRequest(CompletionPerformance performance, AnalysisContext context,
Source source, int offset) {
performance.source = source;
- performance.offset = offset;
if (priorityChangedPerformance != null &&
priorityChangedPerformance.source != source) {
priorityChangedPerformance = null;
@@ -216,7 +215,7 @@ class CompletionDomainHandler implements RequestHandler {
if (data == null) {
return;
}
- performance.contents = data.data;
+ performance.setContentsAndOffset(data.data, offset);
while (performanceList.length >= performanceListMaxLength) {
performanceList.removeAt(0);
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/completion_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698