Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I am using both FSUIPC and wide FS.

I am reading the lat lon and height of MSFS airplane and displaying/updating it on another PC/monitor.

FSUIPC_Read(0x5B0, 36, buf, &dwResult)

........

FSUIPC_Process(&dwResult)

The FSUIPC_Process seems to take up most of the time see below log file

it takes only less than 10ms to return. But sometimes it talkes more than 30 40 ms to return a value. Why is this so? I need to refresh the display every 20 or 30ms with the position so there is no jerkiness/pause in the display.Is it possible to read the values every 20 or 30 ms update?

Time reading FSUIPC = 0.01 ms

Time processing FSUIPC = 9.15 ms

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 0.39 ms

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 0.46 ms

Time reading FSUIPC = 0.01 ms

Time processing FSUIPC = 0.23 ms

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 52.92 ms <----------------------takes a while

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 157.71 ms <----------------------takes a while

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 0.30 ms

Time reading FSUIPC = 0.00 ms

Time processing FSUIPC = 0.39 ms

Posted

The FSUIPC_Process seems to take up most of the time

Yes, of course. It is only the FSUIPC_Process that actually does anything - the Reads/Writes are simple data procedures in YOUR program (as you can see from the source).

Most of the time the Process takes is in Windows -- process switching away from your process into the FS process (or WideClient process).

FSUIPC or WideClient themselves process the message and return to you with the requested data very quickly indeed, once the message is actually received. Typically well under 1 millisecond (I used to have performance checks which reported whenever it took longer than 1 mSec, which they rarely reported, but the checks actually took longer than the rest because they used Windows performance measurement techniques which were themselves quite consuming).

Then there's another Windows process switch back to your process.

Most of the normal time you might see is due to that process switching and message queuing.

Any extra time you see on occasion will be when some other processing is being done as well. This is called "timeslicing" or "multiprocessing" and is what Windows is all about. Please do a CTRL_ALT_DEL and look at your process list. All of those running processes need attention at some stage, and now and then several will contrive to build quite a big delay. A process performing a call or return to another is one of the main opportunities for Windows to give time to others.

it takes only less than 10ms to return. But sometimes it talkes more than 30 40 ms to return a value. Why is this so? I need to refresh the display every 20 or 30ms with the position so there is no jerkiness/pause in the display.Is it possible to read the values every 20 or 30 ms update?

Yes, but you can't actually guarantee that on an operating system like Windows. This is why FS itself suffers occasional jerks.

The best you can achieve will be by setting up a Windows profile which has every service and process you don't need stopped. It is easy enough to stop things like Windows' XPs file indexing, marking files every time they are accessed, and doing a whole host of other things, but I am not the right person to tell you how. There are some helpful hints about somewhere.

Regards

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.