• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA GDI+ Gauges cause low FPS

mendiola_loyola

Resource contributor
Messages
520
Country
peru
Dear All:

Do you know why GDI+ gauges (Using simconnect) reduce the FSX Frames per second?

Without the gauge i have 120-200 FPS but whith the GDI+ gauge loaded on my panel the FPS are reduced to 50 FPS.

Alfredo Mendiola Loyola
Lima, Perú
 
GDI+ is "expensive" as it takes a lot of computing cycles to draw all the objects.

One method that will help optimize performance is to save all objects that are either static, or that aren't frequently updated to memory, then blit them to your active drawing surface only when absolutely necessary.
 
It's not that "GDI+ is slow", that's a popular myth: GDI+ has hundreds of function calls, and each one performs very differently, without looking at the whole source code and how GDI+ was used, it's not possible to understand where you are losing fps.

There are countless methods to draw stuff in GDI+ and, the funny thing is, what seems easy and simple on the source code (an innocent single line of code) it's usually slower, and what seems to be long and complex, it's usually faster. Like, for example, the fact that is MUCH faster to draw a thin rectangle than a straight line...or that is much faster to draw a circle with many points, which might lead to tenths or even hundreds of lines, than to use the single-line Circle instruction...

GDI+ is not "slow" by itself, it's just how it's used, otherwise one should explain why "my" F/A-18 is one of the fastest performing airplanes around, according to the Petreus Index, which measures the average fps compared to the default CRJ (default CRJ it's 100, this means the F/A-18 it's 44% faster that the default CRJ)

3251820427_5e46b7e173_o.jpg


and it's all done in GDI+, with 4 big screens (3 MFDs + 1 HUD), always constantly active...

I suggest using a performance analyzer, like DevPartner (the Community edition for VS .NET 2003 was free), this will tell you exactly how much time each line of your code takes so, once you find the most troublesome places, you can start finding alternative (faster) ways to do the same things. The F/A-18 is the result of such careful analysis, and it has been throughly optimized line by line...

best regards,

Umberto Colapicchioni - VIRTUALI s.a.s.
http://www.fsdreamteam.com
 
Last edited:
Back
Top