-
Notifications
You must be signed in to change notification settings - Fork 61
Load world tiles in parallel #2555
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
base: main
Are you sure you want to change the base?
Conversation
This is cool, and it does seem to make world scrolling a bit smoother. In particular, I used to notice a big stutter every 64 steps as it loaded new tiles; I don't notice that any more. However, I do not consider this to close #2529. Even with this PR I still notice some small stuttering every 4 steps as it has to render a bunch of new view chunks. At the very least we should try using |
I tried to add metrics and actually measure how long does it take us to load tiles. There were a couple of blockers, which made this task bigger than I initially expected:
@byorgey I will split out smaller PRs from this one and get it back to one file change, don't worry. 😄 |
* move World DSL to `Swarm.Game.World.DSL` * re-export from `swarm-scenario/Swarm/Game/World/DSL.hs` * split off from #2555
* split World into smaller modules and re-export * also re-export `Coords` for convenience * split from #2555 * depends on #2567 The idea is to have Tile and Function modules separate from World, instead of having to scroll past them. Then World functions get split into a Pure interface and a monadic/stateful one that should match (some are missing) and be preferred as it will implicitly use cache (it is currently not very used). In the next PR, the monadic interface will be improved with metrics...
* add metric effect to lookup and update functions * replace MTL style entity lookup with fused-effects version * add fake time effect for tests * refactor the robot metrics to use the new metric fused-effect * refactor copy-paste zoom* functions to call one function that accepts a lens * split from #2555 This is the last part that I wanted to split off from #2555. I rewrote most of it and I think I arrived at a cleaner solution for the MTL function and the signatures of Step functions.
-N[x]
to cabal fileTested with
cabal run swarm -- --debug=all --scenario Creative +RTS -s -N10 # try setting number of threads