Quest For The Perfectly Clean Railworks Install
Posted: Fri Jan 09, 2015 8:33 pm
OK, I'll admit up front that this quest is somewhere between a technical challenge and an OCD behavior.
I have a small, separate railworks install that I use for the day-to-day running of my favorite route. I think its been described before how these separate installs are done - I won't go over it. It allows me to have an install that is protected from Steam updates and that contains just the routes I like and the appropriate rolling stock for them. It makes railworks load faster and its is easier to track and maintain a smaller set of assets. I keep things organized for good operation - the correct rolling stock, working sounds, standardized physics etc.
I have been spending time cleaning up this folder, ensuring that all the files are present and the links from one file to the next are properly set up. One thing I noticed is that there are a ton of files that are not actually used! I wrote some software to do a hunt and destroy on these surplus files. I thought the stats might interest you all:
BEFORE THE CLEANUPS
Assets = 5,152,386,872 bytes, 17,927 Files, 1,322 Folders
AFTER TRIMMING UNUSED FILES
Assets = 3,193,116,002 bytes, 9,797 Files, 1,003 Folders
Thats over 8000 unused files amounting to nearly 2 gigabytes of data. Most of these files were just extra assets not actually included in the routes I was running, but some were left over files in rolling stock folders etc that just didn't seem to link to anything. Of course everything still works with the unused files removed - I am pretty sure I haven't missed anything thats actually needed.
I was surprised at the quantity and feel quite good about the results of the cleanup.
So my next step was to search for duplicate files. For this I hacked a program together that hunted out duplicates not based on filename, but on actual content. If file A contained the same content as file B it would report it as a duplicate, regardless of its name or location.
UNNECESSARY DUPLICATES = 974,166,964 Bytes, 2,501 Files
Surprised again - almost a full gigabyte of duplicate files. There are duplicated bogie files, duplicated audio files etc, but many of these are .tgpcdx files where identical files are duplicated from one repaint folder to the next. I suspect since these identical files have different filenames, the graphics engine won't detect them as identical and will load multiple copies into the GPU wasting its finite capacity. I haven't started on how to clean this up.
My next step is to think up some good ways to remove these duplicates, sharing common assets when identical files are referenced. I'll report back if I make any progress in this.
Just an FYI for discussion....
Wayne
I have a small, separate railworks install that I use for the day-to-day running of my favorite route. I think its been described before how these separate installs are done - I won't go over it. It allows me to have an install that is protected from Steam updates and that contains just the routes I like and the appropriate rolling stock for them. It makes railworks load faster and its is easier to track and maintain a smaller set of assets. I keep things organized for good operation - the correct rolling stock, working sounds, standardized physics etc.
I have been spending time cleaning up this folder, ensuring that all the files are present and the links from one file to the next are properly set up. One thing I noticed is that there are a ton of files that are not actually used! I wrote some software to do a hunt and destroy on these surplus files. I thought the stats might interest you all:
BEFORE THE CLEANUPS
Assets = 5,152,386,872 bytes, 17,927 Files, 1,322 Folders
AFTER TRIMMING UNUSED FILES
Assets = 3,193,116,002 bytes, 9,797 Files, 1,003 Folders
Thats over 8000 unused files amounting to nearly 2 gigabytes of data. Most of these files were just extra assets not actually included in the routes I was running, but some were left over files in rolling stock folders etc that just didn't seem to link to anything. Of course everything still works with the unused files removed - I am pretty sure I haven't missed anything thats actually needed.
I was surprised at the quantity and feel quite good about the results of the cleanup.
So my next step was to search for duplicate files. For this I hacked a program together that hunted out duplicates not based on filename, but on actual content. If file A contained the same content as file B it would report it as a duplicate, regardless of its name or location.
UNNECESSARY DUPLICATES = 974,166,964 Bytes, 2,501 Files
Surprised again - almost a full gigabyte of duplicate files. There are duplicated bogie files, duplicated audio files etc, but many of these are .tgpcdx files where identical files are duplicated from one repaint folder to the next. I suspect since these identical files have different filenames, the graphics engine won't detect them as identical and will load multiple copies into the GPU wasting its finite capacity. I haven't started on how to clean this up.
My next step is to think up some good ways to remove these duplicates, sharing common assets when identical files are referenced. I'll report back if I make any progress in this.
Just an FYI for discussion....
Wayne