Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance issues #1

Open
JonasJurczok opened this issue Jun 20, 2019 · 3 comments
Open

performance issues #1

JonasJurczok opened this issue Jun 20, 2019 · 3 comments

Comments

@JonasJurczok
Copy link

Hi,
I just added the mod to my map to replace robots.

I have 3 or 4 logistic networks. All except one are very small (10 roboports, 200 robots).
The biggest one has roughly 1k roboports and ~20k robots. Immediately without placing a chest the UPS dropped by 4.

After placing a chest the UPS stayed the same.

I therefore assume that the performance bottleneck is in the initial loop construct where you build a map of the existing networks.

Question: Do you think it is possible to persist the map between ticks?
Also the multiplication in the on tick event seems to be unnecessary, maybe this is also a small improvement.

What do you think?

@JonasJurczok
Copy link
Author

An additional idea:
would it be possible to put filters on all roboports to deny landing of certain types of robots?
Then the AI pathfinding could do the job and redirect all robots to the only "free" roboport, which is the chest. (I don't know enough about the logistics API yet to make a PR on my own right now :/ )

@sebbi08
Copy link
Owner

sebbi08 commented Jun 24, 2019

Can you provide me your save do I can have a look for me the ups showed no changes but I am also not doing mega bases.

As for the second thing as I am not the original author and have not much exp with modding I don't think I can do it sry

@JonasJurczok
Copy link
Author

save: https://drive.google.com/open?id=1uG5YNz6nv8ZoCN4EskVURtYPBKbpDeoO

Okay no problem. As soon as I find some time I try to get a pull request up so you can check if you like it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants