I am using Delphi Tokyo
I get a 5 second lag in code-insight when I add MMsystem to my Uses clause!.
It was a while that my program started having this huge delay on code-insight, so I looked for ways to optimize the code-insight on the internet but I was unsuccessful.
In the end, I created a new FMX project and simply added all the Uses from my previous project to this new project, and then I tested the code-insight, and I saw the delay! that was when I knew a certain Unit is causing this problem, so I started eliminating these Units one by one while testing Codeinsight after each elimination until I reached MMsystem and I noticed that this Unit is causing the problem!
Now the question is:
1- Why does this happen?
2- How can I fix this?
3- Is there an alternative to this Unit?
Steps to reproducing this problem:
1- Create a new FMX project(I am using Delphi 10.2)
2- Add MMsystem to Uses
3- go to an empty procedure like Form Create and press Ctrl + Space, each time you press these keys, it will take 4-5 seconds for the code-insight to show up