summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-10-21 08:34:00 +0200
committerAnna Henningsen <anna@addaleax.net>2018-10-24 09:57:42 +0200
commit1365f657b51d31044cca54c3152d3940a4bd9dc3 (patch)
tree4772c2b484555de0a0368b35ebf889ff23d154c2 /src/env.h
parentbb79e768e5ab150f2075780734005783d53eb3ca (diff)
downloadandroid-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index 3daa48f9cb..a85058f895 100644
--- a/src/env.h
+++ b/src/env.h
@@ -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_;