chmln / sd

Intuitive find & replace CLI (sed alternative)
MIT License
5.72k stars 136 forks source link

Need to document that `sd` does _not_ stream, loads entire input into memory #286

Open corneliusroemer opened 8 months ago

corneliusroemer commented 8 months ago

I was happy with sd until I noticed that it reads the entire input into memory. There's no streaming support at all.

This is mentioned in the following issues:

But I would expect this to be documented in the README, as it is a major caveat and limitation compared to standard sed.

dev-ardi commented 8 months ago

Don't we mmap everything now? @nc7s

nc7s commented 8 months ago

@dev-ardi:

Don't we mmap everything now? @nc7s

Stdin is still read in full into memory, it's then converted (wrapped?) to a mmap. See discussion in https://github.com/chmln/sd/pull/287.