Jetbrains have a code indexer which is what slows things down at launch. After that, it’s fast. Also I have those things opened for days. Emacs’ uptime is 7 days now (I restarted it to revert a config changes, the mbp itself is up 35 days).
Indexer only actually runs if you update the IDE, otherwise it does incremental update on the changed files, which even if you switched to a branch with many changes is usually instant (or too short to realise it's happening). They optimised indexing a lot over the years.
VSCode with clangd is supersonic compared to CLion with clangd-indexer.