Make use of a LinkedList to store faster used ids.
This commit is contained in:
		| @@ -21,8 +21,8 @@ import java.sql.PreparedStatement; | ||||
| import java.sql.ResultSet; | ||||
| import java.sql.Statement; | ||||
| import java.util.BitSet; | ||||
| import java.util.HashSet; | ||||
| import java.util.Set; | ||||
| import java.util.LinkedList; | ||||
| import java.util.List; | ||||
| import java.util.concurrent.atomic.AtomicInteger; | ||||
| import java.util.logging.Logger; | ||||
|  | ||||
| @@ -190,7 +190,7 @@ public class IdManager | ||||
| 			_freeIdCount = new AtomicInteger(FREE_OBJECT_ID_SIZE); | ||||
| 			 | ||||
| 			// Collect already used ids. | ||||
| 			final Set<Integer> usedIds = new HashSet<>(); | ||||
| 			final List<Integer> usedIds = new LinkedList<>(); | ||||
| 			try (Connection con = DatabaseFactory.getConnection(); | ||||
| 				Statement statement = con.createStatement()) | ||||
| 			{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment