Author Topic: Code::Blocks speed  (Read 29604 times)

Offline iso9660

  • Single posting newcomer
  • *
  • Posts: 2
Code::Blocks speed
« 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks speed
« Reply #1 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.
(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 iso9660

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks speed
« Reply #2 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.
« Last Edit: November 15, 2012, 10:30:04 pm by iso9660 »

Offline davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #3 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
(Debian on RaspberryPI and UDOO)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks speed
« Reply #4 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?
(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 davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #5 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

(Debian on RaspberryPI and UDOO)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks speed
« Reply #6 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.
(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 thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Code::Blocks speed
« Reply #7 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #8 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
(Debian on RaspberryPI and UDOO)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks speed
« Reply #9 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)
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code::Blocks speed
« Reply #10 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\.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #11 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



(Debian on RaspberryPI and UDOO)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks speed
« Reply #12 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.
(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 davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #13 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
 
(Debian on RaspberryPI and UDOO)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks speed
« Reply #14 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.

Offline davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #15 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
(Debian on RaspberryPI and UDOO)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Code::Blocks speed
« Reply #16 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)

Offline davidr

  • Single posting newcomer
  • *
  • Posts: 9
Re: Code::Blocks speed
« Reply #17 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
(Debian on RaspberryPI and UDOO)