Utilize internal cache in StructureGrowthProcess (#371)
* Use whoPlacedCache * Still perform database lookup if cache is empty --------- Co-authored-by: Intelli <6790859+Intelli@users.noreply.github.com>
This commit is contained in:
parent
6045799fea
commit
2476aa2ea8
1 changed files with 4 additions and 1 deletions
|
|
@ -21,7 +21,10 @@ class StructureGrowthProcess {
|
||||||
Map<Integer, List<BlockState>> blockLists = Consumer.consumerBlockList.get(processId);
|
Map<Integer, List<BlockState>> blockLists = Consumer.consumerBlockList.get(processId);
|
||||||
if (blockLists.get(id) != null) {
|
if (blockLists.get(id) != null) {
|
||||||
List<BlockState> blockStates = blockLists.get(id);
|
List<BlockState> blockStates = blockLists.get(id);
|
||||||
String resultData = Lookup.whoPlaced(statement, block);
|
String resultData = Lookup.whoPlacedCache(block);
|
||||||
|
if (resultData.isEmpty()) {
|
||||||
|
resultData = Lookup.whoPlaced(statement, block);
|
||||||
|
}
|
||||||
if (resultData.length() > 0) {
|
if (resultData.length() > 0) {
|
||||||
user = resultData;
|
user = resultData;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue