Skip to content

Conversation

@karlseguin
Copy link
Collaborator

Allows dynamic imports to be loading asynchronously. I know reddit isnt the best example, since it doesn't fully load, but this reduced the load time from ~7.2s to ~4.8s.

Allows dynamic imports to be loading asynchronously. I know reddit isnt the
best example, since it doesn't fully load, but this reduced the load time from
~7.2s to ~4.8s.
@krichprollsch
Copy link
Member

I'm testing it with zig build run -- fetch --log_level debug https://www.reddit.com/r/Zig/comments/1npm8e3/dyld47130_segment_const_zig_vm_address_out_of and I get a v8 crash I don't have in main

#
# Fatal error in ../../../src/src/objects/objects.cc, line 4509
# Debug check failed: Holder<To> v8::internal::Cast(Holder<From>, const v8::SourceLocation &) [To = v8::internal::Union<v8::internal::Smi, v8::internal::HeapNumber, v8::internal::BigInt, v8::internal::String, v8::internal::Symbol, v8::internal::Boolean, v8::internal::Null, v8::internal::Undefined, v8::internal::JSReceiver>, From = v8::internal::Object, Holder = v8::internal::Tagged].
#
#
#
#FailureMessage Object: 0x7ffcec98a300
==== C stack trace ===============================

    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3af3463]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3af143d]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3b64f74]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3b64915]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3f173e1]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3c5068e]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3ae3ded]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x3390083]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x32b159a]
    ./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda() [0x6c930c7]
run
└─ run exe lightpanda failure
error: the following command terminated unexpectedly:
./.zig-cache/o/ae50c4e101ff79b6525507fb93b79753/lightpanda fetch --log_level debug https://www.reddit.com/r/Zig/comments/1npm8e3/dyld47130_segment_const_zig_vm_address_out_of/

Build Summary: 3/5 steps succeeded; 1 failed
run transitive failure
└─ run exe lightpanda failure

@karlseguin
Copy link
Collaborator Author

I'm testing it with zig build run -- fetch --log_level debug https://www.reddit.com/r/Zig/comments/1npm8e3/dyld47130_segment_const_zig_vm_address_out_of and I get a v8 crash I don't have in main

i was able to reproduce this unreliably. Even the HTML.HtmlScriptElement test would fail ~ 1/50 times. After the latest change, I haven't see the crash in either the test or on reddit, but I'm not 100% confident.

@karlseguin karlseguin merged commit 477a5e5 into main Sep 30, 2025
10 checks passed
@karlseguin karlseguin deleted the nonblocking_dynamic_imports branch September 30, 2025 04:30
@github-actions github-actions bot locked and limited conversation to collaborators Sep 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants