meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

rewrite registry/registry list settings

Open MukjepScarlet opened this issue 3 months ago • 4 comments

Type of change

  • [x] Performance improvement

Description

We have many registry-based values like Block/Item... But now they are of List. This causes issue if we:

  • Use .contains on them. Typical List.contains is of O(n) and Set.contains is of O(1)~O(log n).
  • Add same values, ArrayList doesn't prevent us to do that.

This PR is in order to:

  • Migrate same code of these settings
  • Replace List with Set of them

How Has This Been Tested?

Videos or screenshots of the changes if applicable.

Checklist:

  • [x] My code follows the style guidelines of this project.
  • [ ] I have added comments to my code in more complex areas.
  • [ ] I have tested the code in both development and production environments.

MukjepScarlet avatar Oct 07 '25 11:10 MukjepScarlet

I think I messed up the commit history of this branch...

MukjepScarlet avatar Oct 07 '25 20:10 MukjepScarlet

you tried to merge this into the mc-update branch

Wide-Cat avatar Oct 07 '25 20:10 Wide-Cat

I'll try to clean it later

MukjepScarlet avatar Oct 07 '25 21:10 MukjepScarlet

Okay now cleaned

MukjepScarlet avatar Oct 08 '25 09:10 MukjepScarlet