Skip to content

Commit

Permalink
Utilize internal cache in StructureGrowthProcess (#371)
Browse files Browse the repository at this point in the history
* Use whoPlacedCache

* Still perform database lookup if cache is empty

---------

Co-authored-by: Intelli <6790859+Intelli@users.noreply.github.com>
  • Loading branch information
s-yh-china and Intelli authored Jul 17, 2023
1 parent 6045799 commit 2476aa2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ static void process(Statement statement, PreparedStatement preparedStmt, int bat
Map<Integer, List<BlockState>> blockLists = Consumer.consumerBlockList.get(processId);
if (blockLists.get(id) != null) {
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) {
user = resultData;
}
Expand Down

0 comments on commit 2476aa2

Please sign in to comment.