Author Topic: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents  (Read 4857 times)

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
When editing soft-wrapped DocBook documents, I am experiencing CPU spikes and greatly reduced responsiveness when typing into a line that has been soft-wrapped. Strangely, if I toggle soft-wrap off and back on, or even resize the editor window slightly, the problem goes away until the next line I'm typing is soft-wrapped.

This is hard to explain and tough to repro on a new document, so I made a video.

https://dl.dropbox.com/u/6849779/WordWrapIssue.mov

As you can see, responsiveness is fine until a line is soft-wrapped, at which point SlickEdit gets very clunky and the CPU utilization spikes to > 60%. When I resize the window, the problem disappears until my typing is soft-wrapped again.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3396
  • Hero Points: 465
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #1 on: August 01, 2012, 12:59:04 pm »
Try profiling that scenario. 

1. Macro > Slick-C Profiler > Being Profiling. 
2. Then edit the soft-wrapped docbook document as you did in the movie.
3. Macro > Slick-C Profiler > Save...

From watching the movie, I would also suggest turning off auto word completions (Document > Docbook Options... > Auto-Complete > Word completion.

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #2 on: August 01, 2012, 05:26:16 pm »
Ok, I've attached two profiles. The first is for the first line I typed (before soft-wrapping) and the second trace is for the second line (after soft-wrapping and very slow). Glancing at the traces there are some clear differences that I hope will be helpful.

Word completion is off in both the original movie I sent you and the profiles attached. I tried turning off auto-completion for DocBook entirely but that didn't make a difference.

Phil Barila

  • Senior Community Member
  • Posts: 742
  • Hero Points: 61
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #3 on: August 01, 2012, 05:49:47 pm »
17.0.1.0 is out, BTW, so it seems like it might be a good idea to try that version to see if the problem exists in it ...

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.1.0 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #4 on: August 01, 2012, 07:20:24 pm »
I just upgraded and there doesn't seem to be any improvement in 17.0.1.0.

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #5 on: August 15, 2012, 03:03:34 am »
Any progress reproducing this problem? I'd love to see it fixed in a future update. Right now I'm having to quickly toggle soft-wrap on and back off every time SlickEdit wraps a line while I'm editing DocBook XML.

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.2.0 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #6 on: August 22, 2012, 05:52:39 am »
I just upgraded to 17.0.2 and this issue still persists. I tried hunting down the likely suspects from the profile trace myself, but even after stubbing out _as_callback in autosave.e, html_prev_symbol in html.e and a few other functions, I couldn't get this to stop happening.

So...

I have made another movie that more clearly demonstrates the problem. When Soft Wrap is turned on, even when in the Plain Text mode, the first line before the wrap can be typed at normal speed (and CPU usage), but immediately after wrapping subsequent text entry is extremely laggy and the CPU jumps noticeably. Toggling Soft Wrap off and back on restores normal operation until the next time the line is wrapped.

In the movie I use a sample file setup.docbook and save 2 profile traces, fast.tsv and slow.tsv. All these are attached. The movie, which is 41 MB and too big to attach, is on my Dropbox:

https://dl.dropbox.com/u/6849779/WordWrap2.mov

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.2.0 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #7 on: August 22, 2012, 07:55:16 am »
Another data point: this problem does not occur on the Win32 version of SlickEdit (in this case, 17.0.0.8). Profile trace from this version attached.

Phil Barila

  • Senior Community Member
  • Posts: 742
  • Hero Points: 61
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #8 on: August 22, 2012, 03:02:50 pm »
If you haven't done so already, open a support case, as this forum isn't the official vehicle for tracking defects in releases, support cases  are.  Reference this thread in your support case.

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #9 on: August 22, 2012, 04:35:58 pm »
That makes sense. I just opened support case CAS-59145-8TYB.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3396
  • Hero Points: 465
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #10 on: August 29, 2012, 12:32:23 pm »
As the profiling results show, this is not a problem with the smart editing code, it is a drawing problem, and at that, a problem that is specific to Mac OSX.  We are still looking into it.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3396
  • Hero Points: 465
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #11 on: August 29, 2012, 12:58:30 pm »
Try this:  Tools > Options > Appearance > General > Horizontal Scroll bar > Off

geneg1

  • Community Member
  • Posts: 51
  • Hero Points: 4
Re: 17.0.0.8 Mac: CPU spiking when editing soft-wrapped DocBook documents
« Reply #12 on: August 29, 2012, 04:22:24 pm »
Fantastic, that did it!