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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2676363003: Add EvictingFileByteStore and make FileByteStore non-evicting. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 sink = io.stdout; 375 sink = io.stdout;
376 } else if (name.startsWith('file:')) { 376 } else if (name.startsWith('file:')) {
377 String path = name.substring('file:'.length); 377 String path = name.substring('file:'.length);
378 sink = new io.File(path).openWrite(mode: io.FileMode.APPEND); 378 sink = new io.File(path).openWrite(mode: io.FileMode.APPEND);
379 } 379 }
380 } 380 }
381 _analysisPerformanceLogger = new nd.PerformanceLog(sink); 381 _analysisPerformanceLogger = new nd.PerformanceLog(sink);
382 } 382 }
383 if (resourceProvider is PhysicalResourceProvider) { 383 if (resourceProvider is PhysicalResourceProvider) {
384 byteStore = new MemoryCachingByteStore( 384 byteStore = new MemoryCachingByteStore(
385 new FileByteStore( 385 new EvictingFileByteStore(
386 resourceProvider.getStateLocation('.analysis-driver').path, 386 resourceProvider.getStateLocation('.analysis-driver').path,
387 1024 * 1024 * 1024 /*1 GiB*/), 387 1024 * 1024 * 1024 /*1 GiB*/),
388 64 * 1024 * 1024 /*64 MiB*/); 388 64 * 1024 * 1024 /*64 MiB*/);
389 } else { 389 } else {
390 byteStore = new MemoryByteStore(); 390 byteStore = new MemoryByteStore();
391 } 391 }
392 analysisDriverScheduler = 392 analysisDriverScheduler =
393 new nd.AnalysisDriverScheduler(_analysisPerformanceLogger); 393 new nd.AnalysisDriverScheduler(_analysisPerformanceLogger);
394 analysisDriverScheduler.status.listen(sendStatusNotificationNew); 394 analysisDriverScheduler.status.listen(sendStatusNotificationNew);
395 analysisDriverScheduler.start(); 395 analysisDriverScheduler.start();
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 /** 2127 /**
2128 * The [PerformanceTag] for time spent in server request handlers. 2128 * The [PerformanceTag] for time spent in server request handlers.
2129 */ 2129 */
2130 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 2130 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
2131 2131
2132 /** 2132 /**
2133 * The [PerformanceTag] for time spent in split store microtasks. 2133 * The [PerformanceTag] for time spent in split store microtasks.
2134 */ 2134 */
2135 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2135 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2136 } 2136 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698