Null-prototype NativeNamespace receivers for http response once:close/on:finish (~42k slow reads in fastify)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 44/100
Research direction
Start at crates/perry-ext-http/src/server/response_payload.rs:191, then read push_event at :204 and event_callbacks at :211 to trace how the listener store is allocated and read. Compare the response receiver with the emitter instance layout described in linked issue #12689; done means the listener store is instance state on a declared layout instead of a separate null-prototype dictionary.
Written by the indexing model from the issue text.
Description
Found while measuring #12708 (object model step 6, 3b-ii).
The once('close')/on('finish') listener receivers in fastify are null-prototype objects, classified as NativeNamespace. They account for about 42k slow property reads under PERRY_PROBE_DIAG.
Birth site: crates/perry-ext-http/src/server/response_payload.rs:191. events() calls perry_ffi::alloc_null_proto_object. The object is read in push_event (:204) and event_callbacks (:211).
These objects have no layout, so every read takes the by-name path. This belongs with the http half of 3b-ii and the instance layouts in #12689: the listener store should become instance state on a declared layout (node keeps _events on the emitter), not a separate null-prototype dictionary.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 922
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerryTS/perry
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swc-project/swc#12576 ·
Maintainers usually reply within 1 day
-
good first issue gpu serve
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
biomejs/biome#12475 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day