gpz, on 25 July 2013 - 04:15 AM, said:
Stack trace from X.1697 using dotTrace Performance (profiler):
FileStream..ctor • 0 ms • 3 calls • System.IO.FileStream..ctor(String, FileMode, FileAccess, FileShare) 100.00% Open • System.IO.File.Open(String, FileMode, FileAccess, FileShare) 100.00% ParseWAV • ORTS.WaveFileData.ParseWAV(String) 100.00% OpenWavFile • ORTS.WaveFileData.OpenWavFile(String, Int32[]&, Int32[]&, Boolean, Boolean) 100.00% SoundPiece..ctor • ORTS.SoundPiece..ctor(String, Boolean, Boolean) 100.00% SetPiece • ORTS.SoundItem.SetPiece(String, Boolean, Boolean) 100.00% Queue • ORTS.ALSoundSource.Queue(String, PlayMode, Boolean, Boolean) 100.00% Run • ORTS.ORTSPlayOneShot.Run 100.00% HandleEvent • ORTS.ORTSDiscreteTrigger.HandleEvent(Event) 100.00% SignalEvent • ORTS.MSTSWagon.SignalEvent(Event) 100.00% SignalEvent • 0 ms of 0 • ORTS.MSTSLocomotive.SignalEvent(Event) 33.55% StartThrottleIncrease • 0 ms of 0 • 1 call of 3 • ORTS.MSTSLocomotive.StartThrottleIncrease 33.55% StartThrottleIncrease • ORTS.MSTSLocomotiveViewer.StartThrottleIncrease 33.55% HandleUserInput • ORTS.MSTSLocomotiveViewer.HandleUserInput(ElapsedTime) 33.55% HandleUserInput • ORTS.MSTSDieselLocomotiveViewer.HandleUserInput(ElapsedTime) 33.55% HandleUserInput • ORTS.Viewer3D.HandleUserInput(ElapsedTime) 33.55% Update • ORTS.Viewer3D.Update(Single, RenderFrame) 33.55% Update • ORTS.UpdaterProcess.Update 33.55% DoUpdate • ORTS.UpdaterProcess.DoUpdate 33.55% UpdaterThread • ORTS.UpdaterProcess.UpdaterThread 33.55% ThreadStart_Context • System.Threading.ThreadHelper.ThreadStart_Context(Object) Thread "Updater Process" 33.37% SetDirection • 0 ms of 0 • 1 call of 3 • ORTS.MSTSLocomotive.SetDirection(Direction) 33.37% StartReverseIncrease • ORTS.MSTSLocomotive.StartReverseIncrease(Nullable[Single]) 33.37% Redo • ORTS.ReverserCommand.Redo 33.37% ReverserCommand..ctor • ORTS.ReverserCommand..ctor(CommandLog, Boolean) 33.37% ReverserControlForwards • ORTS.MSTSLocomotiveViewer.ReverserControlForwards 33.37% HandleUserInput • ORTS.MSTSLocomotiveViewer.HandleUserInput(ElapsedTime) 33.37% HandleUserInput • ORTS.MSTSDieselLocomotiveViewer.HandleUserInput(ElapsedTime) 33.37% HandleUserInput • ORTS.Viewer3D.HandleUserInput(ElapsedTime) 33.37% Update • ORTS.Viewer3D.Update(Single, RenderFrame) 33.37% Update • ORTS.UpdaterProcess.Update 33.37% DoUpdate • ORTS.UpdaterProcess.DoUpdate 33.37% UpdaterThread • ORTS.UpdaterProcess.UpdaterThread 33.37% ThreadStart_Context • System.Threading.ThreadHelper.ThreadStart_Context(Object) Thread "Updater Process" 33.08% StartTrainBrakeDecrease • 0 ms of 0 • 1 call of 3 • ORTS.MSTSLocomotive.StartTrainBrakeDecrease(Nullable[Single]) 33.08% HandleUserInput • ORTS.MSTSLocomotiveViewer.HandleUserInput(ElapsedTime) 33.08% HandleUserInput • ORTS.MSTSDieselLocomotiveViewer.HandleUserInput(ElapsedTime) 33.08% HandleUserInput • ORTS.Viewer3D.HandleUserInput(ElapsedTime) 33.08% Update • ORTS.Viewer3D.Update(Single, RenderFrame) 33.08% Update • ORTS.UpdaterProcess.Update 33.08% DoUpdate • ORTS.UpdaterProcess.DoUpdate 33.08% UpdaterThread • ORTS.UpdaterProcess.UpdaterThread 33.08% ThreadStart_Context • System.Threading.ThreadHelper.ThreadStart_Context(Object) Thread "Updater Process"
Three examples where file access is performed on the Updater Process thread. :thumbup3: