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

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

Issue 2492933002: Evict from FileByteStore by the total cache size in bytes. (Closed)
Patch Set: Created 4 years, 1 month 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
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 defaultContextOptions.incrementalApi = 361 defaultContextOptions.incrementalApi =
362 options.enableIncrementalResolutionApi; 362 options.enableIncrementalResolutionApi;
363 defaultContextOptions.incrementalValidation = 363 defaultContextOptions.incrementalValidation =
364 options.enableIncrementalResolutionValidation; 364 options.enableIncrementalResolutionValidation;
365 defaultContextOptions.finerGrainedInvalidation = 365 defaultContextOptions.finerGrainedInvalidation =
366 options.finerGrainedInvalidation; 366 options.finerGrainedInvalidation;
367 defaultContextOptions.generateImplicitErrors = false; 367 defaultContextOptions.generateImplicitErrors = false;
368 operationQueue = new ServerOperationQueue(); 368 operationQueue = new ServerOperationQueue();
369 _analysisPerformanceLogger = new nd.PerformanceLog(io.stdout); 369 _analysisPerformanceLogger = new nd.PerformanceLog(io.stdout);
370 byteStore = new MemoryCachingByteStore( 370 byteStore = new MemoryCachingByteStore(
371 new FileByteStore( 371 new FileByteStore(resourceProvider.getStateLocation('.analysis-driver'),
372 resourceProvider.getStateLocation('.analysis-driver')), 372 'temp_${io.pid}', 1024 * 1024 * 1024 /*1 GiB*/),
373 64 * 1024 * 1024); 373 64 * 1024 * 1024 /*64 MiB*/);
374 analysisDriverScheduler = 374 analysisDriverScheduler =
375 new nd.AnalysisDriverScheduler(_analysisPerformanceLogger); 375 new nd.AnalysisDriverScheduler(_analysisPerformanceLogger);
376 analysisDriverScheduler.status.listen(sendStatusNotificationNew); 376 analysisDriverScheduler.status.listen(sendStatusNotificationNew);
377 analysisDriverScheduler.start(); 377 analysisDriverScheduler.start();
378 if (useSingleContextManager) { 378 if (useSingleContextManager) {
379 contextManager = new SingleContextManager(resourceProvider, sdkManager, 379 contextManager = new SingleContextManager(resourceProvider, sdkManager,
380 packageResolverProvider, analyzedFilesGlobs, defaultContextOptions); 380 packageResolverProvider, analyzedFilesGlobs, defaultContextOptions);
381 } else { 381 } else {
382 contextManager = new ContextManagerImpl( 382 contextManager = new ContextManagerImpl(
383 resourceProvider, 383 resourceProvider,
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 /** 2050 /**
2051 * The [PerformanceTag] for time spent in server request handlers. 2051 * The [PerformanceTag] for time spent in server request handlers.
2052 */ 2052 */
2053 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 2053 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
2054 2054
2055 /** 2055 /**
2056 * The [PerformanceTag] for time spent in split store microtasks. 2056 * The [PerformanceTag] for time spent in split store microtasks.
2057 */ 2057 */
2058 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2058 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2059 } 2059 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698