During initial terrain generation, 20% of the total time is spent in -neighborhoodAtPoint: blocked on locks. To reduce contention, add a new method -tryToGetNeighborhoodAtPoint: that bails out immediately rather than block. (The places that are a problem already bail out to avoid blocking on some other locks, so this won't be a radical change.)
During initial terrain generation, 20% of the total time is spent in -neighborhoodAtPoint: blocked on locks. To reduce contention, add a new method -tryToGetNeighborhoodAtPoint: that bails out immediately rather than block. (The places that are a problem already bail out to avoid blocking on some other locks, so this won't be a radical change.)