Skip to content

Replace string_tree with String for message buffering (#20) - #27

Merged
JonasGruenwald merged 1 commit into
JonasGruenwald:mainfrom
glendix-labs:issue-20-reconsider-string-tree
Mar 20, 2026
Merged

Replace string_tree with String for message buffering (#20)#27
JonasGruenwald merged 1 commit into
JonasGruenwald:mainfrom
glendix-labs:issue-20-reconsider-string-tree

Conversation

@GG-O-BP

@GG-O-BP GG-O-BP commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Replaced the string_tree buffer with plain String in the chrome actor's process_port_message, as discussed in #20.

Ran some benchmarks and String came out faster in every scenario even repeated buffering where string_tree should theoretically have the advantage. The biggest difference was on large messages (~100KB) where String was about 3x faster.

The code also gets simpler since we no longer need string_tree in the hot path.

Closes #20

@GG-O-BP

GG-O-BP commented Mar 19, 2026

Copy link
Copy Markdown
Contributor Author

The benchmark module used for testing was excluded from this PR to keep it clean. Results are in #20. Happy to provide the module separately if needed.

@JonasGruenwald

Copy link
Copy Markdown
Owner

Thanks! This looks good to me, seems like the CI issue is unrelated to these changes.

@JonasGruenwald
JonasGruenwald merged commit 1f0daa4 into JonasGruenwald:main Mar 20, 2026
1 check failed
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.

Reconsider use of string_tree

2 participants