-
Notifications
You must be signed in to change notification settings - Fork 45
Fix O(n^2) slow fd_write #95
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
base: main
Are you sure you want to change the base?
Conversation
|
Please move the dependency updates to a separate commit and skip the version bump commit. |
5934500 to
d42058c
Compare
|
I meant separate PR, not commit. My bad. |
|
At the very least, typescript must be bumped, otherwise the baseline 2024 arraybuffer grow type signature as well as the |
|
The dependency bump PR could be merged first. |
d42058c to
8e4b2e9
Compare
| newData = new Uint8Array(newBuffer); | ||
| newData.set(data); | ||
| return newData; | ||
| } |
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.
This function has inconsistent indentation. I don't know why prettier doesn't complain about this.
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.
This is not inconsistent, this is multiple constant bindings in a single const declaration, so newData is one increased level of indentation here.
| const newBuffer = new ArrayBuffer(newDataSize, { | ||
| maxByteLength: newDataSize, | ||
| }), | ||
| newData = new Uint8Array(newBuffer); |
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.
This is missing a const newData, right?
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.
See above.
Closes #93. Note that I've also taken some time to upgrade all the outdated dependencies and fix the code accordingly, if you wouldn't mind.