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

Unified Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 874083002: add periodic delay in analysis to reduce request processing latency (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add flag to disable delay along with comments explaining why the workaround was added 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 | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 1edcf076801c858efb8207c64e2a4c54a97b3846..898aa4fb45e0e76a2bb5aa724d93206222adfb86 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -108,6 +108,12 @@ class Driver implements ServerStarter {
static const String INTERNAL_PRINT_TO_CONSOLE = "internal-print-to-console";
/**
+ * The name of the option used to specify if [print] should print to the
+ * console instead of being intercepted.
+ */
+ static const String INTERNAL_DELAY_FREQUENCY = 'internal-delay-freqency';
+
+ /**
* The name of the option used to specify the port to which the server will
* connect.
*/
@@ -184,6 +190,13 @@ class Driver implements ServerStarter {
// }
// }
+ // TODO (danrubel) Remove this workaround
+ // once the underlying VM and dart:io issue has been fixed.
+ if (results[INTERNAL_DELAY_FREQUENCY] != null) {
+ AnalysisServer.performOperationDelayFreqency =
+ int.parse(results[INTERNAL_DELAY_FREQUENCY], onError: (_) => 0);
+ }
+
int port;
bool serve_http = false;
if (results[PORT_OPTION] != null) {
@@ -327,6 +340,7 @@ class Driver implements ServerStarter {
parser.addOption(
PORT_OPTION,
help: "[port] the port on which the server will listen");
+ parser.addOption(INTERNAL_DELAY_FREQUENCY);
parser.addOption(SDK_OPTION, help: "[path] the path to the sdk");
parser.addFlag(
NO_ERROR_NOTIFICATION,
« no previous file with comments | « pkg/analysis_server/lib/src/get_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698