Hello,
I managed to solve all the problems, I'll post the solution in case someone else stumbles into this:
The problems (high memory usage and 10 second file closing delay) were solved after I checked the CB startup logs (In-IDE unter Logs&Others pane -> Code::Blocks tab) and fixed any problems appearing there:
I fixed the help.ini file which pointed to the wrong help file .chm file names (I dont think this was related to the performance hits).
I fixed some paths C:\Users\<myUser>\AppData\Roaming\CodeBlocks\default.conf which where WRONG and from my old installation of CB 2020.
Especially SpellChecker plugin had some missing icons due to outdated path. Also the sets>gcc>master_path>str compiler had the wrong path (I'm not using it, I'm using a msys2-mingw compiler so I did not notice it was defunct). Finally I added a .idx and .dat thesaurus file for SpellChecker, like described in the spell checker Wiki.
After these measures now CB only requires 80MB of memory after starting and about 100MB after I load my project, and closing files only takes a split second instead of 10 seconds.I'm not sure which of the problems caused the memory hogging, but one of those must have been it.
I'm quite happy now for me this is solved.

I dont think CB should react to incorrect paths in this manner, so if some of the plugin developers of SpellChecker or CB developers may want to have a look how this can happen.
Cheers