Author Topic: Slow statup due to scanning of plugins (Linux)  (Read 6161 times)

Offline NerdIII

  • Single posting newcomer
  • *
  • Posts: 9
Slow statup due to scanning of plugins (Linux)
« 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)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Slow statup due to scanning of plugins (Linux)
« Reply #1 on: November 11, 2010, 06:27:26 pm »
Slow here, too...

gentoo amd64 + q6600 + 4g ram
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline NerdIII

  • Single posting newcomer
  • *
  • Posts: 9
Re: Slow statup due to scanning of plugins (Linux)
« Reply #2 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.

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Slow statup due to scanning of plugins (Linux)
« Reply #3 on: November 12, 2010, 04:31:02 pm »
You can disable some plugins that you may not use.
Regards,
xunxun

Offline NerdIII

  • Single posting newcomer
  • *
  • Posts: 9
Re: Slow statup due to scanning of plugins (Linux)
« Reply #4 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.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Slow statup due to scanning of plugins (Linux)
« Reply #5 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.

Offline NerdIII

  • Single posting newcomer
  • *
  • Posts: 9
Re: Slow statup due to scanning of plugins (Linux)
« Reply #6 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:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Slow statup due to scanning of plugins (Linux)
« Reply #7 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.