snek
9450d0798f
fix(napi): buffer finalizer is nullable ( #30514 )
...
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
Fixes: https://github.com/denoland/deno/issues/30512
2025-08-25 12:57:01 +02:00
Nathan Whitaker
1e34986455
perf(napi): misc napi optimizations ( #30291 )
...
ci / build libs (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
before
```
❯ deno run -A perf-turso.js
cpu: Apple M3 Max
runtime: deno 2.4.3+6ae4eda (aarch64-apple-darwin)
benchmark time (avg) (min … max) p75 p99 p999
--------------------------------------------------------------------------------------- -----------------------------
Statement.get() with bind parameters [expanded] 4'544 ns/iter (4'424 ns … 4'801 ns) 4'599 ns 4'801 ns 4'801 ns
Statement.get() with bind parameters [raw] 4'484 ns/iter (4'409 ns … 4'667 ns) 4'527 ns 4'667 ns 4'667 ns
Statement.run() with bind parameters 5'424 ns/iter (4'833 ns … 4'518 µs) 5'292 ns 8'042 ns 15'292 ns
```
after
```
❯ devdeno run -A perf-turso.js
cpu: Apple M3 Max
runtime: deno 2.4.3 (aarch64-apple-darwin)
benchmark time (avg) (min … max) p75 p99 p999
--------------------------------------------------------------------------------------- -----------------------------
Statement.get() with bind parameters [expanded] 1'141 ns/iter (1'057 ns … 3'223 ns) 1'126 ns 2'910 ns 3'223 ns
Statement.get() with bind parameters [raw] 1'015 ns/iter (975 ns … 1'112 ns) 1'017 ns 1'093 ns 1'112 ns
Statement.run() with bind parameters 1'560 ns/iter (1'295 ns … 8'840 ns) 1'433 ns 8'752 ns 8'840 ns
```
Optimizations are:
- don't log napi entry/exit in release builds (this ends up being very
expensive, as it checks whether logging is enabled twice per call into
NAPI)
- use internalized strings to speed up property accesses (matches node's
behavior as well)
- change order we check value types (matches node now)
- don't unnecessarily validate utf8
- don't get handle scopes when an isolate will do
- reuse handle scope within a function
- use the faster APIs that don't require handle scopes for getting
uint32 / int32 values
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-08-02 17:07:46 -07:00
Bartek Iwańczuk
478121e118
Revert "fix(ext/napi): ensure the finalizer callback will be called (… ( #30018 )
...
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
…#29710)"
This reverts commit 3c3af1011a
.
Going to revert this one, because there are multiple issues reported
that cause panics. We are working on a proper fix, but for the time
being it's better to revert.
Closes https://github.com/denoland/deno/issues/29832
Closes https://github.com/denoland/deno/issues/29874
Closes https://github.com/denoland/deno/issues/29911
Closes https://github.com/denoland/deno/issues/29866
Closes https://github.com/denoland/deno/issues/29973
Closes https://github.com/denoland/deno/issues/29978
2025-07-07 14:44:21 +02:00
Nathan Whitaker
9379a74e08
chore: update to edition 2024 ( #29923 )
ci / publish canary (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
2025-07-02 17:59:39 -07:00
LongYinan
3c3af1011a
fix(ext/napi): ensure the finalizer callback will be called ( #29710 )
...
See
https://github.com/napi-rs/napi-rs/issues/2708#issuecomment-2963957944
for the context.
In current implementation, the Weak `Reference` is created with
`v8::Weak::with_finalizer`, but there is no guarantee as to *when* or
even *if* the finalization callback:
https://github.com/denoland/rusty_v8/blob/v137.2.0/src/handle.rs#L623-L627 .
It may cause the memory leak if Node-API caller want to do some cleanup
jobs in the finalization callback.
2025-06-12 15:05:08 +02:00
snek
979e2f7158
feat: Upgrade V8 to 13.4 ( #28080 )
...
- upgrade v8 to 13.4
- turbocall conversion for arraybuffers is now much more complex, so use
cranelift
- misc updates for deprecated fns
- v8 default stack size is too small now, causing stack overflow
exceptions in some tests
- add syscall shim to support new syscall in old sysroot
2025-02-14 11:26:47 +00:00
Kenta Moriuchi
8fb073d7b4
chore: Happy New Year 2025 ( #27509 )
2024-12-31 19:12:39 +00:00
David Sherret
ac7b33a340
chore: cargo fmt - turn on group_imports=StdExternalCrate ( #26646 )
2024-12-31 12:13:39 -05:00
snek
79a3ad2b95
feat: support node-api in denort ( #26389 )
...
exposes node-api symbols in denort so that `deno compile` can run native
addons.
2024-10-24 09:13:54 +02:00
Bartek Iwańczuk
3f8efe5289
Revert "chore: move all node-api impl to ext ( #24662 )" ( #24680 )
...
This reverts commit d00fbd7025
.
Reverting because, it caused a failure during v1.45.3 publish:
2777371809
2024-07-23 00:01:31 +00:00
snek
92abdb7669
chore: move all node-api impl to ext ( #24662 )
...
these symbols are re-exported from runtime/cli using `build.rs`, so we
don't need them in the same crate.
2024-07-22 11:41:59 -07:00