Closed subframe7536 closed 9 months ago
after scaling the size in const buffer = new Uint8Array(File.bufferSize);
, the performance is improved
Yeah teststream.ts
is meant to be a really quick and dirty implementation of IStream
to facilitate unit testing. It's only used for reading small snippet "files" from memory. As such, performance is expected to be pretty bad.
so would you accept a PR that increase the buffer size?
former issue: #71
I finally reuse testStream.ts to implement IStream, but when save picture to large audio file, the write implemention is signaficantly slow in https://github.com/benrr101/node-taglib-sharp/blob/a7acf237c04e748bb773e4614b0a0add09804378/test-unit/utilities/testStream.ts#L76
same audio file (7.13 MB) and image (14 KB or 1.68 MB perform the same), larger file cost more time
Maybe caused by buffer allocation? Is there any way to fix that?