1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/cli
Bert Belder 41c7e96f1a
Refactor zero-copy buffers for performance and to prevent memory leaks
* In order to prevent ArrayBuffers from getting garbage collected by V8,
  we used to store a v8::Persistent<ArrayBuffer> in a map. This patch
  introduces a custom ArrayBuffer allocator which doesn't use Persistent
  handles, but instead stores a pointer to the actual ArrayBuffer data
  alongside with a reference count. Since creating Persistent handles
  has quite a bit of overhead, this change significantly increases
  performance. Various HTTP server benchmarks report about 5-10% more
  requests per second than before.

* Previously the Persistent handle that prevented garbage collection had
  to be released manually, and this wasn't always done, which was
  causing memory leaks. This has been resolved by introducing a new
  `PinnedBuf` type in both Rust and C++ that automatically re-enables
  garbage collection when it goes out of scope.

* Zero-copy buffers are now correctly wrapped in an Option if there is a
  possibility that they're not present. This clears up a correctness
  issue where we were creating zero-length slices from a null pointer,
  which is against the rules.
2019-05-01 21:11:09 +02:00
..
ansi.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
BUILD.gn Rename test targets (#2262) 2019-05-01 09:48:56 -04:00
build.rs Call ninja directly from build.rs (#2020) 2019-03-30 19:27:00 -04:00
Cargo.toml fs: add Deno.utime/Deno.utimeSync (#2241) 2019-05-01 05:08:11 -04:00
compiler.rs Add support for custom tsconfig.json (#2089) 2019-04-29 07:58:31 -07:00
deno_dir.rs Add support for custom tsconfig.json (#2089) 2019-04-29 07:58:31 -07:00
errors.rs Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177) 2019-04-21 21:26:56 -04:00
flags.rs flags: fix merge error (#2244) 2019-04-29 18:35:25 -07:00
fs.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
global_timer.rs Fix clippy errors and upgrade Rust to 1.33.0 in CI (#1945) 2019-03-20 18:55:52 -04:00
http_body.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
http_util.rs Silence clippy warnings and format source code 2019-04-09 20:05:47 +02:00
js_errors.rs Rename crate deno_core to deno (#2022) 2019-03-30 19:30:40 -04:00
main.rs Rewrite flags.rs::parse_flags (#2237) 2019-04-29 16:43:06 -07:00
msg.fbs fs: add Deno.utime/Deno.utimeSync (#2241) 2019-05-01 05:08:11 -04:00
msg.rs core: Rename Behavior to Dispatch (#2082) 2019-04-09 13:11:25 -04:00
msg_util.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
ops.rs Refactor zero-copy buffers for performance and to prevent memory leaks 2019-05-01 21:11:09 +02:00
permissions.rs Silence clippy warnings and format source code 2019-04-09 20:05:47 +02:00
repl.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
resolve_addr.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
resources.rs Revert "recover: #1517 Kill all pending accepts when TCP listener is closed (#2224)" (#2239) 2019-04-28 14:15:15 -07:00
signal.rs Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177) 2019-04-21 21:26:56 -04:00
startup_data.rs Use correct type for source_bytes when buiding in check-only mode 2019-04-09 20:05:47 +02:00
state.rs Refactor zero-copy buffers for performance and to prevent memory leaks 2019-05-01 21:11:09 +02:00
tokio_util.rs Revert "recover: #1517 Kill all pending accepts when TCP listener is closed (#2224)" (#2239) 2019-04-28 14:15:15 -07:00
tokio_write.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
version.rs Rename crate deno_core to deno (#2022) 2019-03-30 19:30:40 -04:00
worker.rs core: make Isolate concrete, remove Dispatch trait (#2183) 2019-04-23 18:58:00 -04:00