diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-10-21 08:34:00 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-10-24 09:57:42 +0200 |
commit | 1365f657b51d31044cca54c3152d3940a4bd9dc3 (patch) | |
tree | 4772c2b484555de0a0368b35ebf889ff23d154c2 /src/env.h | |
parent | bb79e768e5ab150f2075780734005783d53eb3ca (diff) | |
download | android-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.tar.gz android-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.tar.bz2 android-node-v8-1365f657b51d31044cca54c3152d3940a4bd9dc3.zip |
src: improve StreamBase read throughput
Improve performance by providing JS with the raw ingridients
for the read data, i.e. an `ArrayBuffer` + offset + length
fields, instead of creating `Buffer` instances in C++ land.
PR-URL: https://github.com/nodejs/node/pull/23797
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -668,6 +668,7 @@ class Environment { should_abort_on_uncaught_toggle(); inline AliasedBuffer<uint8_t, v8::Uint8Array>& trace_category_state(); + inline AliasedBuffer<int32_t, v8::Int32Array>& stream_base_state(); // The necessary API for async_hooks. inline double new_async_id(); @@ -951,6 +952,8 @@ class Environment { AliasedBuffer<uint8_t, v8::Uint8Array> trace_category_state_; std::unique_ptr<TrackingTraceStateObserver> trace_state_observer_; + AliasedBuffer<int32_t, v8::Int32Array> stream_base_state_; + std::unique_ptr<performance::performance_state> performance_state_; std::unordered_map<std::string, uint64_t> performance_marks_; |