-
-
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
Set Extent on the Copy -m Mask flag #3130
base: main
Are you sure you want to change the base?
Conversation
Investigating a bit further:
This bug, of Furthermore, somehow, it's much better when the server is running on 1.21, independent of the FAWE version. |
Re-activated this PR. I had set it back to draft as it was unclear exactly what scenarios led to slow performance. I would appreciate any further insight into the underlying performance difference :) |
I don't know if you tested that on the same FAWE build on the different versions, and also with the same configuration. There were quite a few changes in the last months that could affect performance. Can you provide profiles (e.g. through spark, or the IntelliJ profiler) especially of the slow case? Other than that: Would it make sense to move your change into |
1.21 (fast case): https://spark.lucko.me/EjX9IPlk75 |
Hm, from a quick look, I assume that chunks are loaded in the fast case but not in the slow one. Could that be the case? |
Interesting - though it seems we currently directly access the world here, which is what we should avoid and what this PR addresses I guess. |
I will test out your suggestion to move this to setSourceMask tomorrow and update :) |
After taking a closer look, setSourceMask is probably not the right place. But we have similar code already here: Lines 352 to 355 in f386061
This only affects situations with transformations involved, where Lines 414 to 420 in f386061
is missing that part, basically. Adding it in that if would be good I think. |
Overview
While developing ezEdits @eztaK-red and I noticed that not using a MaskTraverser to set the extent on a mask results in significantly slower performance.
We assumed that this could also be why we noticed slow performance in the
-m
flag for//copy
, and that does appear to be the case.There may be other instances of masks in FAWE not having an extent set where performance could be improved, but I didn't want to get ahead of myself in case there were issues with the way that I have fixed it here.
Especially as during testing it appears older versions of FAWE (2.11.1) were even slower, so changes since then may have already had a positive impact on
-m
performance.Description
Sets the extent for the
finalMask
in thecreateCopy()
method used by//copy
which (going by previous FAWE commits) avoids using a WorldWrapper.Rough runtime comparison using


-m #solid,>[!air],[/[0][90]],[|air]
(Before & After fix):Copying a large selection with a "complex" mask & pasting (After fix):


Submitter Checklist
@since TODO
.