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

Optimize performance of extension functions defined on Source when called on a Buffer #342

Open
2 of 5 tasks
fzhinkin opened this issue Jun 12, 2024 · 0 comments
Open
2 of 5 tasks

Comments

@fzhinkin
Copy link
Collaborator

fzhinkin commented Jun 12, 2024

Some extension functions defined on a Source (like readString or readCodePointValue) prefetch data into the source's buffer and then delegate further processing to buffer-specific functions. When invoked on a Buffer, these functions still do all these unnecessary prefetching actions. Instead, such calls should be delegated to a Buffer directly.

Potentially affected functions are:

  • Source.readCodePointValue()
  • Source.readString()
  • Source.readHexadecimalUnsignedLong()
  • Source.readDecimalLong()
  • Source.indexOf
qwwdfsad added a commit that referenced this issue Aug 21, 2024
* Request Long.MAX_VALUE from the source at once (note: no need for a loop as we are unable to build the string of such size anyway)
* Get rid of redundant checks in commonReadUtf8

Ticks one of the boxes in #342
qwwdfsad added a commit that referenced this issue Aug 23, 2024
* Request Long.MAX_VALUE from the source at once (note: no need for a loop as we are unable to build the string of such size anyway)
* Get rid of redundant checks in commonReadUtf8

Ticks one of the boxes in #342
qwwdfsad added a commit that referenced this issue Aug 23, 2024
* Request Long.MAX_VALUE from the source at once (note: no need for a loop as we are unable to build the string of such size anyway)
* Get rid of redundant checks in commonReadUtf8

Ticks one of the boxes in #342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant