Codeblocks takes long time to execute after compiling
The problem was with antivirus. Whitlisting gcc,g++ and codeblocks solved the problem.
I faced the same issue. Later I found out that, its due to antivirus. I don't have any antivirus install in my PC. It was windows Virus and threats protection which was running all the time, which make execution slow.
What I did is, Go to Manage settings. After that you will found Exclusions somewhere. Go to exclusions. Then go to Add/remove exclusions. There just add the folder where your .c or .cpp file is created. And then you are done.
Adding a youtube link which can be useful [https://www.youtube.com/watch?v=OaQQsDIsc8o]