GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — perf: reduce EventSourceStream parser allocations (#5032) by mcollina · Pull Request #5647 · nodejs/undici

Conversation

@mcollina

@mcollina mcollina commented Aug 4, 2026

Copy link
Copy Markdown
Member

Backport

Backports aeed21a (perf: reduce EventSourceStream parser allocations (#5032)) to v6.x.

Cherry-pick had minor conflicts in lib/web/eventsource/eventsource-stream.js (pre-existing v6 JSDoc/type differences and the old this.buffer event-end path). Resolved in favor of the upstream chunked-parser logic while preserving v6-specific annotations and event.id checks.

Validation

node --test test/eventsource/eventsource-stream.js   test/eventsource/eventsource-stream-parse-line.js   test/eventsource/eventsource-stream-process-event.js   test/eventsource/eventsource-stream-bom.js   test/eventsource/eventsource-message.js

52/52 passed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trivikr @mcollina
perf: reduce EventSourceStream parser allocations (#5032)
e77431b
Assisted-by: OpenAI:gpt-5.4
Signed-off-by: Kamat, Trivikram <[email protected]>
(cherry picked from commit aeed21a)
@mcollina
mcollina requested review from KhafraDev, metcoder95 and ronag August 4, 2026 10:06
pacocartones
pacocartones approved these changes Aug 4, 2026
View reviewed changes

@pacocartones pacocartones left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the v6.x backport at e77431b. I independently ran the stated EventSource matrix on Node v24.14.1: 52/52 passed. I also checked the conflict-sensitive resolution: the v6-specific event-id validation is retained and the old event-end path now follows the upstream cursor/reset semantics. I did not find a behavioral divergence in the backport.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
trivikr
trivikr approved these changes Aug 4, 2026
View reviewed changes
@mcollina
mcollina merged commit bd90fff into v6.x Aug 4, 2026
34 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mcollina
mcollina deleted the backport/eventsource-stream-perf-v6 branch August 4, 2026 15:53
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
[Release] v6.28.1 #5773
Merged
This was referenced Sep 23, 2026
refactor: Bump undici from 6.27.0 to 6.28.1 parse-community/Parse-SDK-JS#3105
Merged
refactor: Bump undici from 6.27.0 to 6.28.1 parse-community/parse-dashboard#3460
Merged
This was referenced Oct 24, 2026
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/node-apn#226
Merged
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/Parse-SDK-dotNET#436
Merged
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/parse-server-example#947
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@trivikr trivikr trivikr approved these changes
@KhafraDev KhafraDev Awaiting requested review from KhafraDev
@metcoder95 metcoder95 Awaiting requested review from metcoder95
@ronag ronag Awaiting requested review from ronag
+1 more reviewer
@pacocartones pacocartones pacocartones approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mcollina @trivikr @pacocartones
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.