RamonUnch / GreenPad

Fork from roytam1 fork from original GreenPad
21 stars 0 forks source link

Improve Saving stuff #109

Closed RamonUnch closed 1 year ago

RamonUnch commented 1 year ago
  1. Separate TextFileWPimplWithBuf that derives from TextFileWPimpl, because most saving routines are not depending on an intermediate buffer.
  2. Make generic ReadLine() implementation from ReadBuf with limited buffer size.
  3. Get rid of all crazy realloc stuff, much simpler and safer and faster when saving a file with a Huge line.
  4. Avoid intermediate buffer when making a simple WideCharToMultibyte convertion and instead directly use the file buffer.
  5. Reduce file buffer a little because it is not slower with 32kB and slightly slower with 1KB, but much slower with 128KB. Maybe even lower values could make sense.