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

Async network build, remove switch_max_range #136

Merged
merged 3 commits into from
Dec 9, 2020
Merged

Conversation

S-S-X
Copy link
Member

@S-S-X S-S-X commented Dec 8, 2020

Allows building networks without size limits, building larger network simply takes longer (more globalstep cycles) to complete and start.
Should also prevent possible lag spikes caused by weird huge cable/machine stacks.

Will not yet merge networks if build starts from multiple locations but added technic.merge_networks function to allow doing that.

Network build get 10ms to complete traversing network nodes, if that is not enough then build stops and continues during next globalstep. Switching stations will display build progress.

See #101 for more info.
Closes #101

@S-S-X S-S-X added Enhancement New feature or request Performance Aims to improve technical performance. WIP Work in progress labels Dec 8, 2020
@S-S-X
Copy link
Member Author

S-S-X commented Dec 8, 2020

Should probably add network merging before PR merging to prevent unnecessary cache clearing when conflict happens: network build starts from multiple positions, this is even more likely with time limit instead of range limit.

@S-S-X S-S-X removed the WIP Work in progress label Dec 8, 2020
@S-S-X
Copy link
Member Author

S-S-X commented Dec 8, 2020

Could be good to add automated tests for network merging and fake time variants for current tests that do use multiple networks.
This can be very hard to test manually in game without well known values and timing.
Probably requires adding special support to return fake time through mineunit test framework:
https://github.com/mt-mods/mineunit/blob/b13a73676a4b99ea04ea2e2d758e69db2fc85dde/core.lua#L131-L135

@S-S-X
Copy link
Member Author

S-S-X commented Dec 9, 2020

Probably okayyish enough... hope so at least. Merging as dev server did not crash yet for me 😄

@S-S-X S-S-X merged commit 013dd44 into master Dec 9, 2020
@BuckarooBanzay
Copy link
Member

nice work 🎉

@OgelGames OgelGames deleted the async-net-build branch December 22, 2020 07:17
S-S-X added a commit that referenced this pull request Oct 20, 2021
Async network build, remove switch_max_range
@S-S-X S-S-X mentioned this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Performance Aims to improve technical performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update network cache building to use execution buckets
2 participants