Files
OpenFrontIO/src
scamiv e290e587ea perf: Optimize cluster calculation with DFS and zero-allocation patterns (#2539)
## Description:

Replace BFS with DFS and eliminate GC pressure in calculateClusters():

- Switch from O(N) queue.shift() to O(1) stack.pop() operations
- Replace Set.has()/Set.add() with Uint8Array bitfield
- Add reusable buffer management to avoid repeated allocations
- Implement callback-based neighbor iteration to eliminate array
allocations
- Add forEachNeighborWithDiag() method to Game interface and GameImpl
- Remove now unused GameImpl import from PlayerExecution

Describe the PR.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

DISCORD_USERNAME
2025-12-12 14:19:37 -08:00
..
2025-12-11 21:53:05 +00:00
2025-12-11 21:53:05 +00:00
2025-09-30 11:13:32 -07:00