profile
viewpoint

Ask questionsAdd support for streaming large files

Hello Adam,

Thanks for the great library, it's really useful. I'd like to mention one thing about its usage: when trying to perform replacements in big files (like hundreds of megabytes) then OutOfMemory errors could easily pop up, because the lib loads the file content fully into the memory before, actually, making the replacement. I'm not quite sure whether this was done by design, but it, probably, makes sense to at least mention this fact in README.

An alternative solution, which is memory-friendly (uses streams), could be something like https://github.com/eugeneware/replacestream

adamreisnz/replace-in-file

Answer questions Noeldesarrollo

PR: https://github.com/adamreisnz/replace-in-file/pull/139

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List