I'm noticing stuttering in OR since a couple of releases. Most frequently at the start of the game, but it happens after minutes from start, and mostly NOT connected to loader process work. The stuttering happens even if the loader process does nothing, and looks like this: high FPS (40+) and the game stops for a second/fraction of second with random intervals. Sometimes more frequent sometimes not, but between the stops the frame rate is very high.
I've disabled the console logging too, it helped, but not much.
The stops happening when a shape is loaded according to log. It stops exactly when an S appears on console.
PC: AMD Athlon II X4 @3,1ghz (quad core)
Ati Radeon HD3850 gpu with 512mbytes GDDR3 ram
2x2 gbytes of DDR2 800 Mhz system ram.
Or runs from a Hitachi Deskstar 7K1000.C 1TB HDD
Another different thing that i noticed in source files at MSTS/_math.cs
"return (float)Math.PI + (float)Math.Atan(dx / dz);" and other like this.
As you can see there are two type casts(and type casts are expensive instructions), which can be replaced by one, and maybe it would be faster.
And i've found an interesting article about c# type casts here it is it says that c# have this "as" casting method, where you need to set what type do you expect (it's known already in most of cases) and this is much faster than a plain cast without "as".
I've disabled the console logging too, it helped, but not much.
The stops happening when a shape is loaded according to log. It stops exactly when an S appears on console.
PC: AMD Athlon II X4 @3,1ghz (quad core)
Ati Radeon HD3850 gpu with 512mbytes GDDR3 ram
2x2 gbytes of DDR2 800 Mhz system ram.
Or runs from a Hitachi Deskstar 7K1000.C 1TB HDD
Another different thing that i noticed in source files at MSTS/_math.cs
"return (float)Math.PI + (float)Math.Atan(dx / dz);" and other like this.
As you can see there are two type casts(and type casts are expensive instructions), which can be replaced by one, and maybe it would be faster.
And i've found an interesting article about c# type casts here it is it says that c# have this "as" casting method, where you need to set what type do you expect (it's known already in most of cases) and this is much faster than a plain cast without "as".


Comment