Reply To: req: Multithreading – performance issu large map

Home Forums General Discussion req: Multithreading – performance issu large map Reply To: req: Multithreading – performance issu large map

#15540
eis_os
Participant

I did a analyse of current Train Fever.

Short:

2 Threads are used for the actual game (extra threads for various other stuff like sound ignored)

Thread 1 is the main thread, and the second one does prepare data for internal building simulation/line calculation while you play.

Every month thread 2 is joined with thread 1, and the calculation results used. A new thread 2 will be started…

If thread 2 takes longer then the month (either to fast setting, to much vehicles), you get a month end freeze, as thread 1 waits for thread 2 to finish calculating. This isn’t GPU or HDD limited, while joining may be effected.

You can follow my analyse (in German) here:
http://www.train-fever.net/index.php/Thread/2135-Was-macht-TF-Intern-und-warum-es-ruckelt/

Conclusion:
Currently only massive single thread cpu power for thread 2 helps avoiding the month end freeze with later or complicate games. (or you sell all your vehicles and like to look at AI cars)

 

  • This reply was modified 9 years, 4 months ago by eis_os.