Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue of ZnBivalentWriteStream>>#next:putAll:startingAt: when writing from a large collection #104

Closed
jbrichau opened this issue May 26, 2024 · 0 comments

Comments

@jbrichau
Copy link
Member

The ZnBivalentWriteStream>>#next:putAll:startingAt: collection argument is converted to a ByteArray or a String when needed.

See

buffer replaceFrom: 1 to: count with: collection asByteArray startingAt: offset.

However, the entire collection is converted even though only a part of the entire collection is to be written. Since this method is used in the ZnResponse>>writeOn: through ZnUtils>>nextPutAll:on:, which splits the writing of a large collection into chunks of 16kB, the writing of a large response suffers from a severe performance penalty.

See https://lists.gemtalksystems.com/mailman/archives/glass/2024-May/006674.html

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

No branches or pull requests

1 participant