tc39 / proposal-ecmascript-sharedmem

Shared memory and atomics for ECMAscript
Mozilla Public License 2.0
375 stars 32 forks source link

Add readAsSharedArrayBuffer to FileReader #169

Closed topicus closed 7 years ago

topicus commented 7 years ago

To allow workers play with file contents currently you have three options (maybe more):

If you need to parallelize tasks over file contents (e.g. parsing a big csv file) there is no way to do it without perform a copy which is costly operation when you deal with large files.

It would be great to have a readAsSharedArrayBuffer to read the file straight in a shared array buffer and thus avoid the copy.

Is there any other way to perform this with the current specs that I'm missing?

Sorry if this is not the right place for this proposal.

littledan commented 7 years ago

I think the right place for this proposal would be against the FileAPI at https://github.com/w3c/FileAPI/issues . This specification is just for the JavaScript side, not any associated I/O libraries.

topicus commented 7 years ago

@littledan Thank you, moving this.