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

Issue 9568010: Use a pool of native ports for directory operations (Closed)

Created:
8 years, 9 months ago by Søren Gjesse
Modified:
8 years, 9 months ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use a pool of native ports for directory operations Each directory object creates a new service port which will start a new thread. As these service ports are currently never closed this is a huge problem causing the standalone VM to fail when running out of threads. This change uses a pool of native ports for directory operations. This still ensures that the operations for each directory object are serialized and limits the number of native ports allocated and thus threads started. Even when closing of native ports is possible we might want to keep some kind of pool like this. The reason for this is that to actually determine when the native port is not needed any more we need a finalizer callback on the directory object. R=ager@google.com BUG=none TEST=tests/standalone/src/ManyDirectoryOperationsTest.dart Committed: https://code.google.com/p/dart/source/detail?r=4795

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -21 lines) Patch
M runtime/bin/directory.h View 2 chunks +9 lines, -0 lines 0 comments Download
M runtime/bin/directory.cc View 2 chunks +32 lines, -4 lines 0 comments Download
M runtime/bin/directory_impl.dart View 5 chunks +9 lines, -17 lines 0 comments Download
A tests/standalone/src/ManyDirectoryOperationsTest.dart View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Søren Gjesse
I will do something similar for file if we can agree on this.
8 years, 9 months ago (2012-03-01 13:55:46 UTC) #1
Mads Ager (google)
8 years, 9 months ago (2012-03-01 14:28:14 UTC) #2
LGTM

As discussed offline this should be combined with a number of other things:
thread pool in the VM for the native ports, close operation on native ports that
actually frees the resources used by the port, some heuristics in dart:io for
flushing of inactive native ports.

Powered by Google App Engine
This is Rietveld 408576698