Jump to content
The simFlight Network Forums

FSUIPC External x Internal / Performance

Recommended Posts

about the two libs to C

one is to use external fs and other internal, like a gauge

i want to know if hav different performance between this libs

It isn't related to what's in the libraries. It's the difference between running in the same process as FS, or running in a separate process and so facing process switches for each information exchange.

If you think about that you could expect faster response times with an internal gauge or DLL than with an external EXE -- after all the latter has to post a message onto the FS message queue, wait for it to be processed and answered. All that is internal for a DLL or Gauge (but the library still uses messaging to avoid problems with FS's threading).

However, writing a DLL or EXE isn't the best course necessarily, for two good reasons:

1. A program running internally in the FS process must take great care to avoid performance degradation, pauses, jerks and so on in the simulation. It has to be designed specifically to run cooperatively with FS in all its facets. With an external program you leave time sharing worries to the operating system.

2. By making it a DLL or Gauge it cannot be run on a separate PC across a Network via WideFS, so wasting one of the valuable ways of off-loading work from the FS PC.

By the way, never use the external library for a DLL or Gauge. Although it may seem to work, it is very inefficient (using memory-mapped files for inter-process communication within one process) and is dangerous because the memory-mapped file identification process uses the Process ID, which of course is the FS Process ID, and therefore may not be unique.



Link to comment
Share on other sites

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.