cerus / visual-crafting

Minecraft visual crafting plugin
https://modrinth.com/plugin/visual-crafting
8 stars 3 forks source link

Optimize VisualizationController#getDirection() #2

Closed cerus closed 2 years ago

cerus commented 2 years ago

The VisualizationController#getDirection() method is a little unoptimized at the moment. Every time the method is called a new map is created; that's pretty ineffecient. The map could be moved to a final static field for example. You could also move the whole method into a dedicated utility class.

Relevant code: https://github.com/cerus/visual-crafting/blob/main/plugin/src/main/java/dev/cerus/visualcrafting/plugin/visualizer/VisualizationController.java#L211-L229

Please comment if you would like to work on this and don't forget to follow the contribution guidelines.

mslowiak commented 2 years ago

Hi @cerus ! 👋 I would like to work on this

cerus commented 2 years ago

Alrighty, I've assigned the issue to you @mslowiak! I'm not sure if you're familiar with Hacktoberfest, but if you want you can wait until October 1st before submitting your pull request.