You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A test with 40 trains, each 100 cars taking passengeres between 2 stations used between 10 & 20 % cpu and caused the game to jolt every couple of secconds.
This is occuring in the attached saved game.
Turning 'improved loading algorithm' off reduced cpu to 0% and things ran normally.
The config attached was used to create the game, but I have altered some of the YAPF settings in game which may assert with revisions before ~725x.
This is not confirmed, but I am suspicious that the rating calculations do not reach 100% when they should when using improved loading.
I couldn't run the profiler since I've only got MSVC Pro at the mo. Anyway, I think the problem is that for each car, it checks each other car or more to see if it should load or not - LoadWait(). This may be ok with 10 cars, but 100 cars probably does 100*100 checks.
If I knew enough C I would setup a queue of vehicle references for each cargo type at the station. Trains which needed to wait for cargo would add their cars to the appropriate queue, and wait. When cargo arrived at the station, it would be transfered to the vehicles in the queue. This way no looping or checking needs to be done, and it would be easier to modify the loading order for any new features.
Maybe some other time, or maybe it's already done in the MiniN, but I've had my fill of C for now.
Danny opened the ticket and wrote:
Attachments
Reported version: Bridge branch (dev)
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/423
The text was updated successfully, but these errors were encountered: