In a world where processes can fork-and-exec, nothing about "as a service" changes that. The compiler would just be reinvoked as needed. Converting it into a persistent process breaks a lot more than just allocation optimizations.
But you want to share state and only update state incrementally on edit to get any reasonable level of performance for stuff like language server code analysis.
I'm not sure what the performance overhead would be, but that state can easily be stored on disk.
I'd bet it's a lot harder to rework the compiler to update its state in place than it is to rework it to free memory.