Code::Blocks Forums

User forums => Embedded development => Topic started by: iso9660 on November 14, 2012, 11:57:57 pm

Title: Code::Blocks speed
Post by: iso9660 on November 14, 2012, 11:57:57 pm
Hello all,

I've been working with Code::Blocks for two years in x64 and ARM platforms.
In BeagleBoard it works fairly well, but it is slow with files around 2000 lines of code, also to improve the speed I had to disable TODO checking in source files.
In Raspberry PI the thing is different. As it is slower than BeagleBoard it is almost impossible to work with it. Ironically, I installed Anjuta IDE and the editor works very fast (by far I prefer Code::Blocks, though).

Please, could you put an eye into this performance problem for the next version? I really love Code::Blocks and I'd like to continue using it in my future developments.

Thanks sincerely,
iso9660
Title: Re: Code::Blocks speed
Post by: oBFusCATed on November 15, 2012, 12:07:19 am
What version are you using?
If you've not tried any of the latest nightlies or the 12.11rc1, please try it.
There was a fix committed recently improving the performance of the editor.
Title: Re: Code::Blocks speed
Post by: iso9660 on November 15, 2012, 10:27:27 pm
I'm using version 10.05 compiled for ARMv7 hard float in the Raspberry PI and ARMv8 hard float in BeagleBoard. I installed them from Ubuntu and Raspbian repositories.
Title: Re: Code::Blocks speed
Post by: davidr on November 15, 2012, 10:45:36 pm
Codeblocks editor is very very slow on Raspbarry pi. I have compiled with this options

-mfp=vfp -mfpu=vfp -mfloat-abi=hard -mcpu=arm1176jzf-s -march=armv6

https://code.google.com/p/codeblocks-on-raspberrypi/downloads/list

David
Title: Re: Code::Blocks speed
Post by: oBFusCATed on November 15, 2012, 10:57:52 pm
davidr: What is the SciTe's performance on the same file? Can you provide a profile from gprof/oprofile/vtune or something else?
Title: Re: Code::Blocks speed
Post by: davidr on November 17, 2012, 07:11:50 pm
I have compiled scintilla and scite from scientilla.org home page. It gives the same result. This editor works fine with .txt file and very very slow with .cpp file. There is a work with hardware accelerated Xserver. It can help scintilla editor be much more faster.

http://www.raspberrypi.org/phpBB3/viewtopic.php?t=4649

David

Title: Re: Code::Blocks speed
Post by: oBFusCATed on November 17, 2012, 11:00:02 pm
So you should report this slowness to Scintilla devs, because C::B uses the Scintilla component for the editors.
Title: Re: Code::Blocks speed
Post by: thomas on November 19, 2012, 12:35:40 pm
I have compiled scintilla and scite from scientilla.org home page. It gives the same result. This editor works fine with .txt file and very very slow with .cpp file.
In that case, you should probably report an issue concerning the C++ lexer.

And of course:
So you should report this slowness to Scintilla devs

In the mean time, it may be worthwhile to try and disable syntax coloring in Code::Blocks. I don't recall whether this really disables the lexer or only turns off the color scheme, but it's worth a try. Maybe that makes it usable for you.
Title: Re: Code::Blocks speed
Post by: davidr on November 22, 2012, 08:54:26 pm
Is there an easy way to disable color sheme and/or lexer in any menu or code before compile?.  I have reload rpi with latest raspbian and after that compiled everything with no error. Svn8587 is ready for download now.

scintilla/SciTE works better after disable lexer in cpp.properties file. Where can I find this file in codeblocks source code.

Is it possible to use emacs editor in codeblocks?

David
Title: Re: Code::Blocks speed
Post by: oBFusCATed on November 22, 2012, 10:04:51 pm
Is it possible to use emacs editor in codeblocks?
No, neigher vi (there might be a plugin for vi tough)
Title: Re: Code::Blocks speed
Post by: MortenMacFly on November 23, 2012, 07:48:06 am
scintilla/SciTE works better after disable lexer in cpp.properties file. Where can I find this file in codeblocks source code.
Lexer files are located in [C::B SHARE folder]\CodeBlocks\lexers\.
Title: Re: Code::Blocks speed
Post by: davidr on December 07, 2012, 09:39:30 pm
I have again compiled Scite and scientilla. This time with all CFLAGS needed to armv6 and rpi. Running SciTE editor with .c and .cpp files works fine, no delay. There is some properties-files like SciTEGlobal.properties to change how SciTE works with slower CPU.

When I open a small "Hello World" .cpp file in C::B, CPU works 100% in 5 sec. Why?

Is there any configuration file to tune codeblocks scintilla editor implementation in codeblocks ?

Regards

David

svn 8644 compiled on RaspberryPI v1 (256MB) 850MHz. 2012-10-28-wheezy-raspbian



Title: Re: Code::Blocks speed
Post by: oBFusCATed on December 07, 2012, 09:51:29 pm
Is there any configuration file to tune codeblocks scintilla editor implementation in codeblocks ?
Probably in the code. What do you need to tune?
Posting some oprofile profile would help probably to pinpoint the problem.
Title: Re: Code::Blocks speed
Post by: davidr on December 07, 2012, 10:21:36 pm
When I press i key, i would like to see that character om my monitor immediately not after a second. If codeblocks uses the scientilla/SciTE code, I think it must be fast as SciTE editor.

SciTE editor works very quickly. No delay between key and display.

There must be some parameters to change, when running on a very slow machine like RaspberryPI. I tried to disable .cpp .c lexer (/usr/share/codeblocks/lexers...), but i does not help. Lots of included plugin are disabled.

David
 
Title: Re: Code::Blocks speed
Post by: Jenna on December 07, 2012, 10:43:35 pm
Try to disable all plugins and see if it is better then.
If not, try to find out the settings used by scite, and post them here.

The codecompletion-plugin can slow down C::B, especially if "Update parser when typing" is checked.
Title: Re: Code::Blocks speed
Post by: davidr on December 08, 2012, 02:28:08 pm
dpkg-reconfigure codeblocks
dpkg-reconfigure codeblocks-contrib

All plugins are unchecked. Codeblocks starts very quickly, thats good.

Editor is still very slow.

I have also comment out .c and .cpp in /usr/share/codeblocks/lexer/cpp.properties. Even try to delete this file.

No difference.

I am going to look at SciTE code, makefile and properties later.

David


David
Title: Re: Code::Blocks speed
Post by: dmoore on December 08, 2012, 03:08:17 pm
Also turn off highlight occurrences in editor settings (though that shouldn't make much difference on a small file)
Title: Re: Code::Blocks speed
Post by: davidr on December 08, 2012, 07:35:14 pm
turning off highlight occurrence does not make any difference.

In scientilla/SciTE i have found out that some changes in properties file gives very good performance.

In file /usr/share/scite/SciTEGlobal.properties I have change this lines:

cache.layout = 2
output.cache.layout = 2
buffered.draw = 0
two.phase.draw = 0

After this changes SciTE editor is much quicker when editing a .cpp file.

Is it possible to insert this properties to codeblocks editor ?

David