Skip to content

Conversation

@gwen-lg
Copy link
Contributor

@gwen-lg gwen-lg commented Jan 23, 2025

Draft as it include some change from PR #238, merge it first.

Checklist

  • I have read the Contributor Guide
  • I have read and agree to the Code of Conduct
  • I have added a description of my changes and why I'd like them included in the section below

Description of Changes

Optimization of the write of frame data before send to client with puffin_http.
Example :

  • remove some duplicate data : sequence length already manage by serde, no need to duplicate information.
  • directly serialize in Writer instead of serialize in buffer (Vec) before coping data in writer.
  • avoid cloning of scope_collection

Stats:

When tested with my test/example app puffin-test-app with 250 loops (who only do a sleep), I got this :

allocations Mean self time
Before 7322 166µs
After 6268 135.1µs

Note : Mean self time is for PuffinServerImpl::send

Related Issues

No listed issue.

@gwen-lg gwen-lg force-pushed the optim_serialization branch 3 times, most recently from adbe5aa to 12419c2 Compare August 7, 2025 19:59
@gwen-lg gwen-lg force-pushed the optim_serialization branch from 12419c2 to 06cb1d6 Compare August 17, 2025 22:01
@gwen-lg gwen-lg force-pushed the optim_serialization branch from 06cb1d6 to 3b930b7 Compare August 17, 2025 22:59
this is useless as already done by serde serialization.
BREAKING CHANGE: the frame serialization format change. Introducing PFD5
This allow to serialize scopes collection directly, without need to
collect scope in a temporary Vec.
instead of serialize in a temporary Vec<u8> before coping data in writer after.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant