mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
improve GameDataCategory lookup time
by changing it to something backed by a HashMap with the id as key things can be found without looping over every element. This reduced the startup time on my machine to about half of the original time
This commit is contained in:
@@ -163,7 +163,7 @@ public class SaveItemsWizard extends JDialog {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
Map<GameDataCategory<JSONElement>, Set<File>> jsonToSave = new IdentityHashMap<GameDataCategory<JSONElement>, Set<File>>();
|
||||
Map<GameDataCategory<JSONElement>, Set<File>> jsonToSave = new IdentityHashMap<>();
|
||||
for (SaveEvent event : movedToCreatedList) {
|
||||
if (event.target instanceof JSONElement) {
|
||||
if (!jsonToSave.containsKey(event.target.getParent())) {
|
||||
|
||||
Reference in New Issue
Block a user