Recently, since XCode 11, my Mac starts a process (it seems like it does so when indexing or building files) called swift and my Mac soon starts to lag. This process gathers a lot of memory (sometimes it gathers up to 70 GB) from my computer and I have to kill the process every time in order to get back to normal and start using my Mac as before.
How do I stop this memory pressure from increasing this much ?