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

Improves item comparison performance #3258

Merged

Commits on Sep 15, 2021

  1. Improves item comparison performance

    There are a lot of situations where SF items are CraftItemStacks not SlimefunItemStacks
    
    This is most obvious with cargo and has been a big bottleneck there (~60%).
    
    This PR addresses the cargo specific point but will probably carry over to other parts of the code here and in addons.
    
    In Cargo we wrap the items being used for comparison, these items can still be SF items just, they look like regular Bukkit items. So, the is item similar check should account for this.
    
    With this change it will check if it's wrapped and if it has item meta, if it does then it will try and get IDs to compare. Otherwise, fall back to usual item meta comparison. This improves cargo performance by about 60% when filtering SF items.
    WalshyDev committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    fbc3f9e View commit details
    Browse the repository at this point in the history