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

Unified Diff: pkg/barback/lib/src/file_pool.dart

Issue 35923002: Cap the number of FDs used by barback at 32. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/barback/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/file_pool.dart
diff --git a/pkg/barback/lib/src/file_pool.dart b/pkg/barback/lib/src/file_pool.dart
index 64aa404e10b3fc8ec04f1147c129a955b7b615a7..89e3e80ea24c172159cc1e3f92336acd516986c0 100644
--- a/pkg/barback/lib/src/file_pool.dart
+++ b/pkg/barback/lib/src/file_pool.dart
@@ -38,8 +38,9 @@ class FilePool {
/// The maximum number of file descriptors that the pool will allocate.
///
- /// Barback may only use half the available file descriptors.
- int get _maxOpenFiles => (maxFileDescriptors / 2).floor();
+ /// This is based on empirical tests that indicate that beyond 32, additional
+ /// file reads don't provide substantial additional throughput.
+ final int _maxOpenFiles = 32;
dgrove 2013/10/22 20:31:48 Did you try measuring this on a variety of compute
/// Opens [file] for reading.
///
« no previous file with comments | « no previous file | pkg/barback/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698