Add SequentialDataBase as a better SimpleDatabase#129
Add SequentialDataBase as a better SimpleDatabase#129ZZZank wants to merge 5 commits intoCleanroomMC:1.12from
SequentialDataBase as a better SimpleDatabase#129Conversation
|
Isn't it better to just have |
yes it will be a better solution, but I think this should be in another PR, since this PR only focuses on improving |
…e redirected to this new class
SimpleDatabaseSequentialDataBase as a better SimpleDatabase
|
since #130 provides a better fix for questline entries, this PR only focuses on providing a better I added a new database implementation |
This PR is made for resolving this issue:
but unlike PR128, who made a stupid and not-working
LongSet, this PR replacedBitSetwithIntOpenHashSetfor id usage lookup, with alowerBoundfor skipping ids that are certainly used when generating new id, it works like this:nextID, it will return the first id not inidsand in range[lowerBound, Integer.MAX_VALUE), if found,lowerBoundwill be set to id+1, and the id will be added toidsremoveID()), lowerBound can be set to the removed id because it might be the smallest unused id now. But note that this will not happen when removed id is smaller thanlowerBound