this one is protected by the`optimizeMutex` btw. I wonder why this optimize mutex is not just a Lock?