- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 239
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
feat: improve fawe limits (#2773) #2858
Conversation
See dea1fcf for fix |
So, changing from I'm not sure about the different limit implementations. Are they needed? How relevant would be the overhead when just having a limit using Similarly, the |
In fairness where we're likely to see the speed matter is concurrent-capable operations that are already fast, i.e. set and replace, where we'd be using the concurrent limit anyway so it's probably worth just collapsing to atomic. I don't think VarHandles can offer us much more than we're getting with Atomic. We need to be sure of both the read and write at the same time and the read only matters "once" as the edit is consequently exited so I would say the simplicity of Atomic is worth it. The memory overhead is also next to nothing |
dea1fcf
to
08f401f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One thing I noticed is that ABlockMask#test(Extent, BV3)
still goes through the extent. I wonder if we actually need that method at all or if the default is good enough, or if it is safe to go the vector.getBlock(extent)
route there too. E.g. a //replace stone diamond_block
on a 2048x320x2048 area takes ~26s vs ~17s due to that.
- add FaweLimit implementations for increasing concurrency levels - allow FaweLimit to perform processing (and forcefully disable as required) to capture [tile] entities - Use `BlockVector3#set(Extent orDefault)` where appropriate to reduce block checks - fixes #2679 - fixes #1874 (cherry picked from commit 6052fc3)
- cannot remember why I made this change in the first place in #2773 but this fixes edits having "empty middles" - doesn't seem to have broken anything in testing
08f401f
to
43b0e40
Compare
BlockVector3#set(Extent orDefault)
where appropriate to reduce block checks