Author Topic: [1.8.2] Lags and stalls  (Read 1570 times)

Hollywood_315

  • Guest
[1.8.2] Lags and stalls
« on: December 09, 2019, 12:18:49 PM »
Hey guys

I hope you're all well and thanks for keeping this great product up-to-date.
Although VA up to 1.7.8 has been working like a champ, I do have an issue to report with 1.8.2 atm.
While 1.7.8 was lightning-fast it seems 1.8.2 has introduced quite a massive lag in thread management and/or buffering, leading to reproducible stalls.

I can give you the recipe below which requires DCS World flightsim to run.
Perhaps that's a bit much to ask in which case I may have to do a video, which I'm not particularly good at 8-} but in any case please advise.

Recipe to reproduce:

0) install DCS World (free) https://www.digitalcombatsimulator.com/en/products/world/
1) install VAICOM PRO plugin (free) https://www.vaicompro.com/uploads/7/5/4/3/75436709/vaicompro_2_5_13.zip
2) import the profile from Profiles subfolder
3) Start a DCS mission and hammer away (fast!) at keyboard keys 1-6.

With 1.7.8, this works flawlessly, VA is unbreakable and extremely responsive.
With 1.8.2, VA is very slow to react, lags, and chokes blocked in unrecoverable 'listing suspended' mode in no time.

This is regardless of whether the plugin UI is open or not, also VA settings for Minimize etc. make no difference.
Interestingly 1.8.2 behaves fine when the DCS sim is not running. The difference is that with DCS running there is UDP data received by the plugin and processed in subsequent threads.
Since this worked flawlessly before in 1.7.8 there's my suspicion that something has perhaps changed in the way threads are managed and/or data is buffered in VA.

Many thanks for looking into this and let me know if more help needed.

All the best!
Hollywood

[UPDATE:] Did some more testing. The effect seems only to appear when I select the plugins debug mode which generates long messages in the VA log. I noticed these long messages are now truncated in the VA log window where they were left as-is before i.e. in 1.7.8. So it seems the culprit must be sought in this log entry-shortening part of the VA UI management thread. Hope that helps grtz.     
 

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: [1.8.2] Lags and stalls
« Reply #1 on: December 09, 2019, 01:00:11 PM »
One thing to note is that the new log system will buffer and batch messages instead of showing them as quickly as possible, so you can't necessarily derive timing information purely from observing it.


That said, writing large amounts of data to the log does cause slowdown of the UI, and if done quickly enough, VoiceAttack will crash with an out of memory exception.

E.G.
Code: [Select]
Set Text [test] to [C:\vap with some commands.vap]
Start Indefinite Loop
    Write [Blue] '{TXT:test}' to log
End Loop

The log is also slow to scroll when displaying these long entries, even after the command is stopped. Sections with normal-length data scroll fine when dragging the scrollbar, longer sections jump and stutter.


As a side note, the log now truncates longer messages in tooltips, which makes sense, but now there is no method for getting a larger amount of data out using the log. I'm not sure about this, but wasn't the intent to have copying the log message using the context menu still yield the full output?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: [1.8.2] Lags and stalls
« Reply #2 on: December 09, 2019, 01:01:06 PM »
Thanks for the update, Hollywood. 

The log behavior did in fact change.  The log in 1.8+ should perform better overall, but, you've probably stumbled upon an anomaly in there.  I'll give it a look as soon as I can.

Hollywood_315

  • Guest
Re: [1.8.2] Lags and stalls
« Reply #3 on: December 09, 2019, 02:09:26 PM »
Thanks gents, much appreciate the swift replies.
No biggie and I'm sure you'll get it sorted.
Indeed if possible would be good to still be able to copy out full messages using context menu.
Pleasure as always!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: [1.8.2] Lags and stalls
« Reply #4 on: March 08, 2020, 04:09:21 PM »
I'm back around to this again and I'm finding that it's probably going to be necessary to limit the output of the log to something like 255 characters (the tooltip was truncated previously at like 150 characters - I've just now increased it to 255)).  The reason is that the number of lines can be changed by the user and that number can be as high as ten thousand lines - if we're dumping a lot of info out per line, that adds up quickly.  Plus, the log is processing tokens and also keeps other information behind the scenes (a copy of the the text for rendering plus id's and other stuffs).  I never really planned for it to hold extreme amounts of info o_O

Sorry this has taken so long to resolve :(


Edit - Actually, 512 characters @ 10000 lines displayed is OK, with 256 characters in the tooltip (which may actually be too much tooltip---) seems to work alright.

Edit 2 - I've uploaded a build (v1.8.3.23) into the, 'unofficial' bin:  http://voiceattack.com/u   Hoping the choking and crashing is gone ;)