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

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
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

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: latency spikes while editing
« Reply #1 on: September 15, 2016, 07:22:33 PM »
Macro > Profiling

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
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: 159
  • Hero Points: 6
Re: latency spikes while editing
« Reply #3 on: September 16, 2016, 03:38:43 AM »
Caught it! :)

Profile attached.

Iker

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
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: 159
  • Hero Points: 6
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

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
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.