Stuttering in OR

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kox
    Senior Member
    • May 2010
    • 329

    #1

    Stuttering in OR

    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".
    Last edited by kox; 03-06-2012, 12:17.
    sigpic
  • longiron
    1000 Post Veteran and Moderator

    • Jan 2007
    • 1453
    • Just south of NYC

    #2
    We are taking a look at this ... there's some indications that it is related to .NET garbage collection which halts all working threads until its work is done. We're doing some code restructuring in the upcoming release, but not designed directly to address this issue. We've also discussed some major restructuing efforts in the future to lean out the code in some areas (eliminate some redundancies for better performance) and tackle any stuttering issues directly.
    Chris
    "True rail fans have two favorite railroads. The B&O and one other."

    Comment

    Working...