Comments (5)
The current implementation mapps a Brush Class like TreeSnipeBrush
to multiple so-called handles. To my understanding, these act like aliases and produce the same result when used.
It currently uses the type Multimap<Class<? extends IBrush>, String>
.
With that, it mapps e.g.:
TreeSnipeBrush.class
=> "t", "tree", "treesnipe"
It possibly can be changed to a Map<String, Class<? extends IBrush>>
. I think this is what you meant with this issue.
Now the following mapping would take place:
"t"
=> TreeSnipeBrush.class
"tree"
=> TreeSnipeBrush.class
"treesnipe"
=> TreeSnipeBrush.class
therefore, there would be more data stored then needed.
from voxelsniper-reimagined.
That makes sense, The main reason we wanted a HashMap is because it's search performance is roughly O(1) while the search performance for a MultiMap at least how we currently do it is O(n) with n being the amount of entries
from voxelsniper-reimagined.
Maybe to add to @KevinDaGame's explanation:
The main point was that we had to check every entry of the multimap to find the required brush class, while we never really needed to get the names based on a class (except for unit tests, in which case performance is not as important). I think the amount of extra data stored is relatively small and worth the improvement in my opinion.
from voxelsniper-reimagined.
than, this could be closed now.
from voxelsniper-reimagined.
not sure why it didn't close automatically, closed manually
from voxelsniper-reimagined.
Related Issues (20)
- Todo list 1.20 update
- might want to cache worlds instead of making a new instance every time (can be done later probably) HOT 1
- Refactor operations
- [BUG] Biome brushes cause large lag spike on use
- Todo list Forge feature complete
- Make IBlockData system more scalable
- [FEATURE] Enable stencil brush to paste entities
- [FEATURE] Worldedit cross compatibility
- [FEATURE] Save schematics HOT 1
- [BUG] targeting blocks with the cm (combo-material) performer resets their blockdata
- [BUG] Latest Forge release doesn't load (MC 1.20.1)
- [BUG] Memory leak when unloading worlds HOT 4
- [FEATURE] improve forge material selection HOT 1
- Fabric Port HOT 2
- [FEATURE] Flatten Brush
- [FEATURE] backport fabric version to 1.20.1 please HOT 1
- [BUG] Update Schematic4J
- [FEATURE] Litematic support for stencils
- [BUG] Custom vanilla biomes not supported HOT 2
- [Refactor] A consistent way to open files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voxelsniper-reimagined.