-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Backend: Event Predicates #3417
Open
ItsEmpa
wants to merge
6
commits into
hannibal002:beta
Choose a base branch
from
ItsEmpa:backend/event-predicates
base: beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tick Signed-off-by: Empa <[email protected]>
Signed-off-by: Empa <[email protected]>
Signed-off-by: Empa <[email protected]>
One or more Detekt Failures were detected:
|
NopoTheGamer
suggested changes
Feb 11, 2025
hannibal002
requested changes
Feb 11, 2025
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.
waiting on changes above
Signed-off-by: Empa <[email protected]>
One or more Detekt Failures were detected:
|
Signed-off-by: Empa <[email protected]>
Signed-off-by: Empa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR changes the way in which conditions are checked when invoking events, only looking at which conditions will have to be checked when the listener is first initialized, and storing the conditions as lists of lambdas. it also makes it so that conditions such as onlyOnSkyblock and onlyOnIsland(s) are only calculated once every tick, which should help with performance a bit on events that get called a lot (such as render events getting called every frame).
This PR also indirectly fixes the issue found and fixed in #3411, because it only accesses the values of the HandleEvent object once.
Did some testing while in hub 1, this is the difference i found when profiling the previous and the new shouldInvoke function was of more or less ~66%
Profiling Images
before
![imagen](https://private-user-images.githubusercontent.com/42304516/411735448-d19687c0-c867-4958-ba06-5cba5415f160.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDQ3NTksIm5iZiI6MTczOTM0NDQ1OSwicGF0aCI6Ii80MjMwNDUxNi80MTE3MzU0NDgtZDE5Njg3YzAtYzg2Ny00OTU4LWJhMDYtNWNiYTU0MTVmMTYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MTQxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3MjM1YTk3YzI2NDg0YmU1ZjFlMmM2OGU0ZTRhODQwOGVlZjgyOWE3NjJkMTgwZGIxZjA2Mjc0OThiOTJlMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RDVds2iEbwCdYQIySnwU5lW6m9d5tuKp_t6oVnTSFX0)
![imagen](https://private-user-images.githubusercontent.com/42304516/411735528-6c7095b8-6d3c-41cb-a62a-f0807d40e4b8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDQ3NTksIm5iZiI6MTczOTM0NDQ1OSwicGF0aCI6Ii80MjMwNDUxNi80MTE3MzU1MjgtNmM3MDk1YjgtNmQzYy00MWNiLWE2MmEtZjA4MDdkNDBlNGI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MTQxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlOGRhMDU1MTc2NmU1OWU1MGVhZWFjMmY4MWJhZWU1MWI3MDFiNzIzNWMwYzVmZDY4YWQ0Yzk2OWU1ZTllMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1WgBOnahyDMpu1Nx0cXSDtmwYxF5R7OIAsvnRVcyNyo)
after
Changelog Improvements
Changelog Technical Details