Intelliji idea is very slow in debug mode and it is running perfectly in normal mode.
I already tried by setting the below thing in /etc/hosts file sudo nano /etc/hosts
After testing a lot of different solutions, I finally solved these slowness issues by switching my JDK from JDK 11 to JDK 8.