It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints).
This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
Related Posts
Over a sufficiently long time horizon, all code you write is legacy code.
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!
I'm intrigued to see that Google has quantified that new code is generally buggier and less secure than code that has existed in your codebase for longer: https://security.googleblog.com/2024/09/eliminating-memory-safety-vulnerabilities-Android.html