MobiFlight / MobiFlight-WASM-Module

The WASM module is the interface between MobiFlight and MSFS2020
MIT License
60 stars 20 forks source link

MSFS micro stuttering due to reading/monitoring too many Simvars #9

Closed cpuwolf closed 1 year ago

cpuwolf commented 2 years ago

Great Thanks to MobiFlight, I found I have no reason to develop a new module, except to reuse mobiflight. it is a great gift of open source community.

After I deeply developed a client based on your module, I found a serious performance issue.

micro stuttering is seen regularly every xxx ms. a sudden frame drop regularly be seen in below screenshot

From a user experience, it is not acceptable.

shutters

By removing Community\mobiflight-event-module, micro stuttering is gone.

Background: I am developing a SimConnect client calling MobiFlight module.

DocMoebiuz commented 2 years ago

with how many values does this happen? I haven't encountered this problem yet in my setups.

cpuwolf commented 2 years ago

@DocMoebiuz I have around 40 SimVars to be monitored. I have confirmed it will cause micro stuttering. I did CtrlX/CtrlV mobiflight-event-module at least 10 times. I am sure it has side effect on MSFS performace

cpuwolf commented 2 years ago

I have uploaded a video to show you what was happened https://youtu.be/uX5df6sIRN4

Koseng commented 2 years ago

Hi, nice video with sound effects ;-).

I will do some tests as well.

An issue on the mobiflight WASM side is just one possibility.

Problems might also be caused on the simconnect client side:

Some tests will show.

Koseng commented 2 years ago

Ok I did tests and can confirm. It also happens if the external simconnect client is disconnected and the WASM just does its work with the registered variables.

On my system:

cpuwolf commented 2 years ago

Ok I did tests and can confirm. It also happens if the external simconnect client is disconnected and the WASM just does its work with the registered variables.

On my system:

  • Until 50 simple variables there is barely anything noticeable
  • With 70 variables I have stutter every 3s
  • With 80 variables I have stutter every 2.5s
  • With 100 variables I have stutter every 2s
  • Above 100 it goes crazy and it is a stutterfest. It seems there some threshold is reached.

it is exactly matching my testing, micro shutter will be there once the client has registered these values in Mobi. Thanks for confirmation