Author Topic: CPU Slow down when soft wrapping very long lines  (Read 3281 times)

rowbearto

  • Senior Community Member
  • Posts: 2344
  • Hero Points: 132
CPU Slow down when soft wrapping very long lines
« on: December 18, 2018, 01:20:54 PM »
When I enable soft wrap and I have some very long lines such as 12000 columns, I notice that SlickEdit gets very slow and CPU usage goes way up when I start scrolling.

Sometimes during my build my link line is very long (like 12000 columns), and I want to view it with soft wrap in the Build editor window. When I soft wrap it and start scrolling, SlickEdit is getting very slow.

I'm on Linux x64, CentOS 7.2, SE 23.0.0.11, hotfix 1

rowbearto

  • Senior Community Member
  • Posts: 2344
  • Hero Points: 132
Re: CPU Slow down when soft wrapping very long lines
« Reply #1 on: December 18, 2018, 01:44:45 PM »
I uploaded a sample build log with very long lines to support, look for softwrapslow.log.

Create a C/C++ other project where the build cats this file. Then in the build window (as large editor window), go to line 906, enable soft wrap, then start using scroll wheel, try to place cursor somewhere on the line, rinse, repeat, etc.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7049
  • Hero Points: 535
Re: CPU Slow down when soft wrapping very long lines
« Reply #2 on: December 19, 2018, 02:19:00 PM »
For now, you've gone past the performance capabilities of SlickEdit. There has been a lot of optimizations done in this area but it's still not enough.  Many consecutive long lines with softwrap on causes a lot of performance overhead.

As a workaround you can lower the "Wrap line length" to something like 2000 (default is 4000). Tools>Options>File Options>Load. This should help quite a bit. You'll need to restart SlickEdit after changing this option.
« Last Edit: December 19, 2018, 02:23:28 PM by Clark »

rowbearto

  • Senior Community Member
  • Posts: 2344
  • Hero Points: 132
Re: CPU Slow down when soft wrapping very long lines
« Reply #3 on: December 19, 2018, 05:59:53 PM »
Thanks for the reply Clark.

What exactly does the "Wrap line length" setting do? I notice mine is set to 8000. Will it add an LF at the end of long lines when I load a file? I'd rather not it add an LF or any characters as I don't always load log files, I sometimes load some debug makefiles that also have this long linker line in a recipe.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7049
  • Hero Points: 535
Re: CPU Slow down when soft wrapping very long lines
« Reply #4 on: December 19, 2018, 06:07:10 PM »
What it does is break long lines into multiple smaller lines (to improve performance) such that if you save the file, the split lines DO NOT get saved with new-line characters. Theoretically, this can allow you to edit files with any line length.

Currently, this option is global and not per language type.

rowbearto

  • Senior Community Member
  • Posts: 2344
  • Hero Points: 132
Re: CPU Slow down when soft wrapping very long lines
« Reply #5 on: December 19, 2018, 06:11:11 PM »
OK. I reduced this down to 2000. Performance seems much better on one of the files I tried. I can easily live with this because it does not add LF characters in. I see from going to hex mode no LF characters and I see the same line number when viewing line numbers.

Thanks!