perf(cdp): scope the V8 lock per connection to run connections in parallel
With every connection on its own thread (previous commit), the process-wide V8 lock served no safety purpose across connections yet forced all of them to serialize on one mutex, so throughput did not scale with concurrency. Move the lock into CdpContext so each connection has its own: a connection's nav task and command dispatch still coordinate on one page's isolate at a time on its thread, but different connections no longer block each other. Delete the now-unused process-wide obscura_js::v8_lock. Measured on a local CPU-bound fixture, page throughput stays flat (~75/s from concurrency 1 to 8) with the global lock and scales to about 2.5x at concurrency 8 with the per-connection lock, with no crash at any concurrency. Obstacle course 33/33, obscura-cdp 76/76. Refs #430.
This commit is contained in:
1 parent
6c7b2b0cec
commit
9065f383de
4 files changed
+21
-34
No files matched your search
@@ -6,7 +6,6 @@ pub mod module_loader;
|
||||
pub mod runtime;
|
||||
pub mod ops;
|
||||
pub mod v8_flags;
|
||||
pub mod v8_lock;
|
||||
pub mod markdown;
|
||||
|
||||
pub use markdown::HTML_TO_MARKDOWN_JS;
|
||||
|
||||
Reference in new issue
Block a user