Code Monkey home page Code Monkey logo

Comments (8)

dgw avatar dgw commented on June 13, 2024 1

The performance argument also applies to bots, I presume. Searching an inventory for the desired item and removing it must be the same operation whether it's an inserter or a drone initiating it. The logistic network tracks free spaces separately from the checks an inserter must use, silly me. I'm not too keen on making balancing decisions based on performance shortcomings in the game, though. Obviously the ideal inventory search code would run at O(1), or at most O(log n), rather than O(n) or worse. It's too bad mods can't do anything to help that—but at least the performance curve isn't geometric, right? 😁

Rebalancing to wooden chests doesn't feel right because you have to feed in at least one steel chest in the form of logistic containers for the logistic warehouse/storehouse types, plus the steel and iron plates you need to build the basic versions (and added iron to build the logistic variants too). I get the feeling this issue might snowball into a recipe rebalance, too, and there are some good reasons to do that. For example, wooden chests aren't fully automatable in vanilla because wood more or less has to be gathered manually (unlike ores), so I'm starting to lean toward removing those from the crafting recipes. There's also the ingredient counts to think about, since we have one variant (storage) that can't be built in anything less than an AM3. More detailed thoughts on the recipes from me in a separate issue, when I collect them.

My first instinct, honestly, is to tweak the sizes back down as an excuse to keep a lid on the slot counts. Problem is, that would mean removing the 1:1 (or 2:1) size correlation between warehouses (or storehouses) and cargo wagons, and that's a really nice feature of having 6x6 / 3x3 entities that we probably shouldn't change without a very good reason.

I'd really like to poke at the inventory code to see what data structures Factorio uses internally and thus figure out whether there's any hope of improved performance in the future, but sadly I'm not Bilka and I don't have source code access. I suspect it's an unsorted array, meaning O(n) is the best complexity we can expect, but I also don't want to just use that assumption without proof.

That was a much faster search than I expected: Rseding91 on chest performance (and the hope for further performance improvements is pretty much nil)

from warehousing.

Anoyomouse avatar Anoyomouse commented on June 13, 2024

Oh, I remember now

When i started warehousing, long time ago, they were based around sizes of a 5x5 footprint, and then changed it up to a 6x6, so possibly that's where the extra whole row of chests come in. (quick edit, that's still only 32 slots per tile for a 5x5 - steel chests would give you 1200 slots)

Also, the whole scrollbar thing in inventories getting added because i was trying to make a chest with 2000 slots.

We also need to keep in mind that the more slots are in the warehouses the slower Factorio gets when using inserters (basically they have to search the entire inventory looking for empty slots), so take that calculation times 2000, and you start to see the problem (we've had people on the forums experiencing slow downs with over 50 storage warehouses - that's way not a lot)

Maybe we should look at rebalancing to wooden chests instead of steel chests because of the less storage space?

Anyway, we definitely need to revisit this

from warehousing.

Anoyomouse avatar Anoyomouse commented on June 13, 2024

Quote from Rseding91:

Chests are so well optimized that literally the only time I've seen them show up as a slow spot when profiling saves in my 3+ years of working on Factorio is when someone was using 2000 slot modded chests with 20+ inserters putting into and out of 50+ chests at once just to show it was slow.

Well, in my experience since warehouses it's not uncommon to have 50+ chests full of your crap items ... :P

The original concept was that the warehouses would break the stack limit and you could for example only have 200 slots, but each slot could contain like 2 or 4 times more items than a standard stack (think of storage drawers mod from Minecraft), but in huge warehouses.

Without LUA entities, or control over the inventory system from scripting (back in 0.13), the easier implementation was just hugs chests. Now with 0.16 (and ever increasing) i haven't really been playing Factorio enough to warrant this revisit, so we're stuck with huge chests.

So, think here, if you have 50+ storage warehouses full of inserters you'll get a noticeable slowdown, if every chest is 2000 slots, you're going to see that slowdown faster ...

Isn't it worth losing some slots to the convenience of having a chest that's accessible from (6 * 4) 24 sides instead of just the 4?

from warehousing.

SgtSnipey avatar SgtSnipey commented on June 13, 2024

I asked several months back about if you guys intended on adding Larger buildings down the road, You said you might revisit it down the road so could this be the time to look at it again? It might help you address some of your individual issues of changes.

from warehousing.

dgw avatar dgw commented on June 13, 2024

Larger buildings would require new graphics. While @Nova-Kast is (I think) working on updated graphics for the 0.17 mod release, I don't think we've discussed changing entity sizes at all. We might bring it up.

Personally, I think the 3x3 and 6x6 sizes are pretty perfect, because of how well they match up with base-game entities—train wagons (6 tiles long), assembling machines (3x3), etc. Especially the train loading/unloading use case, where you can place rows of 6x6 warehouses between pairs of rails and have the inserters all line up nicely on both sides.

I'd have to look into the potential pitfalls of making a larger, non-square warehouse building. (Mods like Merging Chests already exist, so it's probably doable.) A lot of IRL warehouses are rectangular, but not square, so that could add a nice variety.

from warehousing.

dgw avatar dgw commented on June 13, 2024

FFF 269 today announced Factorio 0.17 is planned to release in January 2019. That's a good target for getting this done.

from warehousing.

dgw avatar dgw commented on June 13, 2024

Latest word from FFF 282 is that 0.17 will come out around the end of this month (February 2019). If anyone thought that studios other than Valve were immune from the effects of Valve Time… well, this is a lesson! 😆

from warehousing.

dgw avatar dgw commented on June 13, 2024

Worked on this as part of #59.

from warehousing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.