branchrust_reboot/main/naval_update/industrial_optimcancel

12 Commits over 0 Days - ∞cph!

18 Days Ago
Formatting fixes
18 Days Ago
Rework buffer transfers, all tests now pass
18 Days Ago
Fixed a bunch of tests, buffer transfers still failing
18 Days Ago
Merge from naval_update
19 Days Ago
Profiling
19 Days Ago
Parse the conveyor's filters into item/blueprint/category dictionaries for faster lookups Takes 800 filter checks from 1.4ms to 0.12ms
19 Days Ago
Disable pipe shadows at 25% of the cull distance Cuts out a lot of shadow casters on big industrial bases
19 Days Ago
Fixed some allocations
19 Days Ago
Big scary industrial conveyor refactor Main goal here is to try and reduce how many loops are inside loops, as this scales poorly with large item containers (every slot from every input container is iterating over every slot on every output container) Do a single prepass over all of the input items and run them through the conveyor filters, resulting in a single list of items that we can process, then attempt to move them to the output containers Improved GetTotalItemAmount as this was a major time sink when using filters with min/max amounts. Now iterates over the items directly rather than using GetSlots (which triggers another full loop over the container for every slot) Added an IEqualityComparer to ItemDefinition that just compares itemid, should speed things up when comparing ItemDefinitions
20 Days Ago
Wrapped the new time tracking in editor defines
20 Days Ago
TC's now cache their allowed construction items in a ListHashSet for faster checks Not really worth doing in normal circumstances but it seems common to have junk items attempting to transfer into a TC constantly, this saves about 0.01ms on each attempt
20 Days Ago
Added an Input and Output item list that is populated during a conveyor move, allowing us to read and write items faster without having to use GetSlot (which could potentially iterate over the whole container each call) Restructure some of the iterators in IndustrialConveyor.Move to iterate over the item list directly instead of using GetSlot This removes all usages of GetSlot in the conveyor move system which can be called over 3k times in a bad conveyor move Added a shortcut for LookAtIOEnt to resolve what item a storge cotnainer is attached to when holding the wire tool, resolves the multi second freeze in the editor (was faster in builds, but this should still be faster)