Code::Blocks Forums

User forums => Help => Topic started by: NerdIII on November 11, 2010, 05:29:05 pm

Title: Slow statup due to scanning of plugins (Linux)
Post by: NerdIII on November 11, 2010, 05:29:05 pm
I noticed that when I move all the plugins away from where Code::Blocks expects them the IDE loads instantly. Otherwise it uses 15 seconds of CPU time (2 Ghz Core 2 Duo) to load them. I am a bit surprised how this can be such a time consuming operation. Especially when I write plugins myself and restart the IDE often it becomes annoying.
Do you experience the same on Linux, or is my system bugged?
If this is a common problem, and more plugins are added it would be better to just read the manifest file to display information and only dlopen the plugin when it is in use in contrast to constructing the plugin object even when it won't get attached. (Now that I think about it, the unzip operation could also be the bottleneck, not just dlopen)
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: oBFusCATed on November 11, 2010, 06:27:26 pm
Slow here, too...

gentoo amd64 + q6600 + 4g ram
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: NerdIII on November 12, 2010, 11:29:57 am
I guess I am still paranoid from a situation I had with the AWN panel that spawns a lot of python processes for applets and each of them started out with 40MB RAM use. When I asked someone if that was normal he said no and I figured as a last resort I could just recompile everything python (dependencies and reverse dependencies). It turned out that worked magic and the RAM usage was back to normal.
I don't trust Gentoo too much there.
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: xunxun on November 12, 2010, 04:31:02 pm
You can disable some plugins that you may not use.
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: NerdIII on November 12, 2010, 04:39:35 pm
xunxun: A disabled plugin is still unzipped, the library loaded and the plugin object constructed. You only avoid a call to the attach method which could be trivial in most plugins that just sit there waiting for input.
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: ptDev on November 12, 2010, 05:26:15 pm
You should uninstall (not just disable) any non-essential plugins. You may need to run Code::Blocks as root. That should help.
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: NerdIII on November 13, 2010, 07:33:05 pm
So I gave Code::Blocks root privileges and it created an empty 'codeblocks' directory in the filesystem root. Ok, I use an SVN build, but still this is one of the reasons you don't give your applications more privileges than neccessary. I'm looking for a safe option here  :lol:
Title: Re: Slow statup due to scanning of plugins (Linux)
Post by: Jenna on November 13, 2010, 08:01:56 pm
So I gave Code::Blocks root privileges and it created an empty 'codeblocks' directory in the filesystem root. Ok, I use an SVN build, but still this is one of the reasons you don't give your applications more privileges than neccessary. I'm looking for a safe option here  :lol:
What you can do as workaround: is to remove the zip-file(s) belonging to the plugins you don't want from /usr/share/codeblocks (or just rename them to *.zip.save.