Author Topic: slow  (Read 32623 times)

rotalever

  • Guest
slow
« on: July 26, 2007, 04:03:12 pm »
I think I've already read all the threads on this topic. CB is too slow on my Linux (Ubuntu 7.04) machine.
My system is:
AMD XP 2200+, gforce 6800GS with 9631 drivers.
Everything is quite fast: firefox, gedit, scite (the scintilla editor), ...
But entering text in CB is somewhat slow. It is lagging all the time.
I use rev 4321, nightly build 25.jul ubuntu package with wxWidgets 2.8.4

Any tricks to make it faster for me?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: slow
« Reply #1 on: July 26, 2007, 05:12:56 pm »
Hi !

You can disable unnecessary plugins: Plugins->Manage plugins...
CC, even if very useful, consumes a lot of time.

Dje

rotalever

  • Guest
Re: slow
« Reply #2 on: July 26, 2007, 08:39:19 pm »
I disabled every unnecessary plugin before doing the tests in the editor  :(
CC is disabled anyway, I dont like it^^

In addition, not only text input is lagging but marking text with the mouse is also damn slow.
« Last Edit: July 26, 2007, 08:41:00 pm by rotalever »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #3 on: July 26, 2007, 10:17:47 pm »
rotalever: you aren't the first to report these problems with linux. Personally, I've only seen the editor lag on my ubuntu laptop a few times. I always see large amounts of lag when I drag the management or log windows around. At first, I thought it was some event processing problem between Scintilla (the editor control) and wxAUI (the dock window manager) -- I couldn't isolate an obvious problem at the time so now I'm not so sure.

if you are willing to persevere, perhaps you could start by compiling CB yourself from source and see if you have better performance.
« Last Edit: July 26, 2007, 10:19:43 pm by dmoore »

rotalever

  • Guest
Re: slow
« Reply #4 on: July 26, 2007, 10:38:24 pm »
I thought about that, but CVS is disabled I do not know howto access SVN...

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #5 on: July 26, 2007, 10:43:31 pm »
so long as you have the svn client installed it is easy:

http://developer.berlios.de/svn/?group_id=5358

rotalever

  • Guest
Re: slow
« Reply #6 on: July 26, 2007, 10:54:02 pm »
Thanks I will give it a try... Maybe tomorrow because it is late here...

rotalever

  • Guest
Re: slow
« Reply #7 on: July 27, 2007, 11:00:15 am »
I compiled it, created the deb packages, installed it and loaded my small document: Still way too slow  :(
It is such a good IDE... but too slow on linux.
Any idea what I could try?

rotalever

  • Guest
Re: slow
« Reply #8 on: July 27, 2007, 12:03:02 pm »
Ok, the problem has nothing todo with CB. I tested some examples from the wxwidget webpage. The HTML-Viewer and the textboxwidget are very slow, too. It is the same lag as in CB if you try to select some text.

Compiling wxwidgets on my own doesnt change anything.
« Last Edit: July 27, 2007, 02:55:05 pm by rotalever »

rotalever

  • Guest
Re: slow
« Reply #9 on: July 27, 2007, 06:02:54 pm »
In the wx forums they say I should use gtk1.x instead of gtk2. But then I should use wx 2.6.3 instead of 2.8.4 because of some refresh problems. I compiled wx 2.6.3 against gtk1.x and installed it. Works fine.

But now I have to recompile CB to work with wx2.6.3
Compiling outputs:
Code
make[3]: Betrete Verzeichnis '/home/bla/software/codeblocks/src/sdk/wxFlatNotebook'
/bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA   -I../../../src/include/wxFlatNotebook/include  -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxFlatNotebook.lo -MD -MP -MF .deps/wxFlatNotebook.Tpo -c -o wxFlatNotebook.lo `test -f 'src/wxFlatNotebook/wxFlatNotebook.cpp' || echo './'`src/wxFlatNotebook/wxFlatNotebook.cpp
 g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I../../../src/include/wxFlatNotebook/include -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxFlatNotebook.lo -MD -MP -MF .deps/wxFlatNotebook.Tpo -c src/wxFlatNotebook/wxFlatNotebook.cpp  -fPIC -DPIC -o .libs/wxFlatNotebook.o
src/wxFlatNotebook/wxFlatNotebook.cpp: In member function 'virtual int wxPageContainer::HitTest(const wxPoint&, wxPageInfo&, int&)':
src/wxFlatNotebook/wxFlatNotebook.cpp:1125: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1134: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1138: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1145: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1162: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1190: error: 'class wxRect' has no member named 'Contains'
make[3]: *** [wxFlatNotebook.lo] Fehler 1
make[3]: Verlasse Verzeichnis '/home/bla/software/codeblocks/src/sdk/wxFlatNotebook'
So I cannot compile it...

Another thing:
I configured CB for compiling using "configure". It says I need to install gtk2-dev to compile. Why this??? It does not work with gtk2-dev? I thought it uses wxWidgets? And my wxWidgets is compiled against GTK1..

rotalever

  • Guest
Re: slow
« Reply #10 on: July 27, 2007, 08:24:57 pm »
Hmm, it really looks like if CB NEEDS GTK2... That is bad. I think GTK1 would have been fast enought.

mikeandmore

  • Guest
Re: slow
« Reply #11 on: July 29, 2007, 04:09:04 pm »
i personally think it is the CB's notebook widget that slow down the speed...

See i have tested the wxScintilla - which was used by CB - Sample on my computer, it works fine...
So I think is when you input something or drag something on the editor, the editor will produce an UPDATE_UI message the the FlatNoteBook.
and let the FlatNoteBook to redraw it...It's the redraw algrithm during the draw that slow down the speed.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: slow
« Reply #12 on: July 29, 2007, 04:52:17 pm »
Are you certain about this?

If you edit wxFlatNotebook.cpp, lines 771ff like this:
void wxPageContainer::OnPaint(wxPaintEvent & event)
{/*
   wxBufferedPaintDC dc(this);
   wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() );

   render->DrawTabs(this, dc, event);
*/}

does the problem persist?

We have postulated many times what might be causing this, update_ui messages being one thing, but rather firing off too many. However, most of this is theory so far, no really hard evidence.

If you could prove that it is the actual tab drawing code which causes the slowdown (if it disappears after commenting out that section), this would be great. Then Eran would probably be able to fix this issue by inserting 2-3 lines of code to filter out surplus events.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: slow
« Reply #13 on: July 29, 2007, 05:23:27 pm »
I am using wxFlatNotebook on FC6, FC7 & Ubuntu 7.04 - all works fast.
To prove the point, I suggest running the demo application provided with wxFlatNotebook (which uses wxTextCtrl and not using wxScintilla).

If it is indeed wxFlatNotebook, I will be more than happy to fix it.

Eran

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: slow
« Reply #14 on: July 29, 2007, 07:39:20 pm »
Actually, I doubt it is wxFlatNotebook, rather I think it is our fault because we fire off too many events (and wxWidgets creates several copies of each on top).
But if it was really the drawing of wxFlatNotebook that caused the slowdown, we could really deem ourselves happy, finally having a pivot point. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."