Re: Friday Facts #206 - Workflow optimisation
Posted: Sat Sep 02, 2017 4:33 pm
Oh jesus, finally, replace function, I love you guys !!!
www.factorio.com
https://forums.factorio.com/
Half of the build time (or maybe even more now) is due to linking which is just single thread.genericname1 wrote:4) if your build process could use more than one core rather than the insanely expensive i9 you could have had a 14 core xeon for a similar amount of cash
This sound like a solid idea. It will help avoiding switching splitters while upgrading by accident without making the planned replace-feature less intuitive.5thHorseman wrote:I see a lot of people worried that "you can replace yellow splitters with yellow belts" means "you can't blanket replace yellow belts with red belts, because they'll also replace the yellow splitters."
I don't see why this has to be the case at all. Why can't they allow you to replace all 3 yellow belt types with the other belt types of the same color, but only allow you to cross colors, not types?
So, a yellow belt will be replacable by a yellow splitter, a yellow underground, a red belt, or a blue belt. Only.
This would give us the new functionality but not remove the functionality we have now.
Sadly the only thing that came up into my mind was "Wow, It will be a real nuisance without Klonan's upgrade planner...", thing is, First I do upgrade all the splitters, then the undergrounds, then I just run around up and down placing belts going through whatever is there, now, with the new feature it means I have to be careful to not destroy all the balancers and stuff replacing splitters and whatnots with regular belts...kovarex wrote:It is not on our to do list, but I like the idea of Upgrade planner, so it might become vanilla future some day.Ratzap wrote:Now all stock needs is the functionality from 'Upgrade planner'. Manually replacing yellow transport then red later in my sotck save is soooo tedious and error prone.
Hey therekovarex wrote:https://www.factorio.com/blog/post/fff-206
Would splitting the executable to several dlls/so's help?posila wrote:Half of the build time (or maybe even more now) is due to linking which is just single thread.genericname1 wrote:4) if your build process could use more than one core rather than the insanely expensive i9 you could have had a 14 core xeon for a similar amount of cash
Lower IPC on Ryzen, and Factorio performance is more reliant on single threaded performance.Lappro wrote:I'm curious about the reasoning why you've chosen to upgrade your dev machines to i9s. Is there a reason threadripper didn't make it or was it never considered? At a quick glance it looks like you could've gotten 6 cores/12 threads more for the same price.
Either way great FFF again, nice combination of news for the average player as well as some nice in-depth behind the scenes stuff.
1. The consumer grade hardware has higher clocks / fewer cores, which benefits Factorio run speed. Compiles may take a few more seconds with fewer cores, but the game needs to run quickly.genericname1 wrote:Since I work with servers all day here are a few suggestions.
1) stop buying consumer grade hardware!
2) go and buy a datacentre grade SSD. They tend to come rated for a number of drive writes per day - 3 dwpd is the full capacity of the drive written 3 times a day every day for several years. Generally several petabytes of data
3) look at nvme (Intel make some lovely pci ssds, 1gigabyte/s read speeds etc)
4) if your build process could use more than one core rather than the insanely expensive i9 you could have had a 14 core xeon for a similar amount of cash
Ho did you realize that it was boost which adds that much time to the compilation?The result is, that changing boost::mpl::vector66 to std::variant can improve the compile time from 1:44 to 1:20 and getting rid of templates completely by using unions can decrease the compile time to 0:53.
I guess in such a big project its hard to put fingers on 2 files easily.....also because of from what you said i think you are using boost in much more places...in a project with 3390 files, 410k lines of code and 15Mb of source code
I tested replacing boost::variant with std::variant when trying new C++17 features because every time I look into the internals of a boost class implementation it makes me sad at how poorly written it is.ToASter wrote:Ho did you realize that it was boost which adds that much time to the compilation?
Wow. So it was just by chance.Rseding91 wrote: I tested replacing boost::variant with std::variant when trying new C++17 features because every time I look into the internals of a boost class implementation it makes me sad at how poorly written it is.
Thanks for that answer. I've not used Rust first-hand but have some experience in C++11 and rarely encountered the problems people usually complain about. Sure, it's ugly in so many ways but on the other hand it seems to be the only game in town when digging down to the bare metal. Rust might change that but we'll see. It might be time to get some real Rust experience on microcontrollers.Rseding91 wrote:I can answer that one: Rust sounds interesting at first but places *way* too many restrictions on what you can do such that I would venture to say it's impossible to write any reasonably sane program with it without having to use the "just let me do it" "unsafe" option all over the place defeating the so-called advantages it's meant to give.
Regarding segfaults/off-by-one errors: no. Those are C problems and we write modern C++ - memory leaks/off-by-one errors are a symptom of someone using C++ as C - and a sign that they aren't a good developer. Those problems were solved long ago around when the C++ 11 standard was finished in 2011.
Is it "poor" or "sophisticated beyond human comprehension"?Rseding91 wrote:I tested replacing boost::variant with std::variant when trying new C++17 features because every time I look into the internals of a boost class implementation it makes me sad at how poorly written it is.ToASter wrote:Ho did you realize that it was boost which adds that much time to the compilation?
I don't know if it's feasible for production (I don't do big projects in C++) build, I guess they would have did it long ago if it would help. Compilation times are huge for many C++ projects, not only in video game industry.hoho wrote:Would splitting the executable to several dlls/so's help?posila wrote:Half of the build time (or maybe even more now) is due to linking which is just single thread.genericname1 wrote:4) if your build process could use more than one core rather than the insanely expensive i9 you could have had a 14 core xeon for a similar amount of cash
Of course, it wouldn't help with full rebuild and if you alter some piece of code that affects everything but I would imagine if one works on something that effects a small piece of code, linking should be faster than linking one big executable.