Author Topic: latency spikes while editing  (Read 864 times)

IkerAriz

  • Senior Community Member
  • Posts: 102
  • Hero Points: 1
latency spikes while editing
« on: September 15, 2016, 02:23:03 pm »
Throughout the betas and RC1 I've noticed periodic latency spikes when editing. Ie, type characters, VS pauses noticeably, editor reflects typed characters. I had previously chalked it off as simple transients but with RC1 the issue seems to be more pronounced. Does VS provide logging/tools to help measure this more objectively?

Iker

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2326
  • Hero Points: 307
Re: latency spikes while editing
« Reply #1 on: September 15, 2016, 07:22:33 pm »
Macro > Profiling

IkerAriz

  • Senior Community Member
  • Posts: 102
  • Hero Points: 1
Re: latency spikes while editing
« Reply #2 on: September 16, 2016, 03:33:41 am »
FYI. Working on getting a profile but having some trouble with segfaults. With the profiler enabled I hit a nice latency spike and VS segfaulted just as I was about to save the profile. Restarted VS, enabled profiling, after a while hit a spike and... another segfault before I could save :(

Iker

IkerAriz

  • Senior Community Member
  • Posts: 102
  • Hero Points: 1
Re: latency spikes while editing
« Reply #3 on: September 16, 2016, 03:38:43 am »
Caught it! :)

Profile attached.

Iker

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2326
  • Hero Points: 307
Re: latency spikes while editing
« Reply #4 on: September 16, 2016, 09:00:22 pm »
Well, the profile shows a grand total of 1/2 second spent by various things in Slick-C.  Nothing to be alarmed by.  This means the latency has to be coming from somewhere else.  I'd recommend investigating more deeply after you get RC2.

IkerAriz

  • Senior Community Member
  • Posts: 102
  • Hero Points: 1
Re: latency spikes while editing
« Reply #5 on: September 19, 2016, 02:30:07 am »
The time it took me to start the profile, edit a little and stop the profile was probably between 5-10 seconds. Can you shed some light on what's captured by the profile? Is there diagnostic output one could use to get a rough idea how long it takes VS to process each key press?

Thanks,
Iker

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2326
  • Hero Points: 307
Re: latency spikes while editing
« Reply #6 on: September 20, 2016, 05:41:30 pm »
Slick-C profiling captures the time spent in the Slick-C interpreter.  Most of the work is done there, so it is helpful for finding bottlenecks, but there is work, like color coding, drawing, and other bookkeeping that Slick-C has no part in.

I think I may have stumbled onto the problem that you were seeing though in the course of solving another problem.  There will be a fix in RC3 that could help.