Author Topic: Saving a large file is *really* slow  (Read 2073 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1855
  • Hero Points: 179
  • Text
Re: Saving a large file is *really* slow
« Reply #15 on: September 20, 2017, 09:18:18 pm »
Ah.... So this changed when I was trying to figure out encoding and line endings (see other posts about this).
Confirmed: Changed to "automatic" and the problem goes away.
SaveAs->LF (even though the file is already LF) is also slow - presumably this is the same code path.


I wanted to get so all newly created files are utf-8 and LF endings.

So, what does "AUTOMATIC" do here?
The Help text in Options shows:
    Specifies how end of line characters are translated when a file is saved. Automatically attempts to determine the context.

I have no idea what that means ... what context?
Windows vs Linux?


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4938
  • Hero Points: 404
Re: Saving a large file is *really* slow
« Reply #16 on: September 21, 2017, 02:26:50 am »
For existing files,EOL characters are determined from first line of file. Otherwise, use OS default line endings. Also, save won't translate lines with mixed line endings unless a specific line ending format is specified. When all save translations are off. Save is fastest. When there are save translations what modify the original file, a lot of data that must be spilled may be generated in addition to the file contents being written to disk.
« Last Edit: September 21, 2017, 02:44:02 am by Clark »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4938
  • Hero Points: 404
Re: Saving a large file is *really* slow
« Reply #17 on: September 21, 2017, 02:29:23 am »
Looks like there is a bug in the optimization code. The save code was trying to optimize this particular case but it was goofed so it thinks every line is being modified when saving an LF file where the original file already just has LF line endings. The CR LF case is optimized correctly.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4938
  • Hero Points: 404
Re: Saving a large file is *really* slow
« Reply #18 on: September 21, 2017, 02:42:50 am »
This optimization has been fixed in the next build