Thankfully my colleagues saw the value in what I was doing. I smuggled the optimization into my PR with their approval. Anecdotal, but there are still people who care about efficiency out there.
That being said, unless your manager is John Carmack, or you work in embedded systems, time spent on reducing memory footprints is seen as wasteful by the business.
I think that there is a way to change that.
If an application runs significantly better on lower end hardware while delivering the same results, the customers should prefer it. It is just a matter of promoting it that way.
MS Teams uses around 1000MB of RAM to do exactly the same things that Microsoft Messenger could do in 8MB.
It's haaard to do state machines.
If they knew how to do a state machine, a glorified chat app needs how many threads? Maybe 4: UI, network, audio, video. And the last 2 are only needed during calls.
They have 12 just because they don't know to do better.
Btw with teams (the application) off there's a com.microsoft.teams2.agent there anyway. What's it for, spyware?