Author Topic: slow  (Read 20627 times)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: slow
« Reply #30 on: August 01, 2007, 01:01:56 pm »
But if I want to compile CB with this wxWidgets it says that it need GTK-2.0-dev. So installed the GTK2 development files for ubuntu.
And I do not know howto disable ansi, whatever this means...

So it means you need GTK+2 to compile C::B. ANSI build can be turned off using --enable-unicode
Be a part of the solution, not a part of the problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #31 on: August 01, 2007, 02:49:13 pm »
So it means you need GTK+2 to compile C::B.

... with the supplied C::B configure/makefiles.

it seems to me that they should be tweakable to work with GTK1.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #32 on: August 01, 2007, 04:42:02 pm »
configure.in contains:

Code: [Select]
if test "x$HAVE_PKG_CONFIG" = "xyes"; then
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0)
fi

...

WX_GTK2_CFLAGS=
WX_GTK2_LIBS=

...

WX_BASENAME=`$WX_CONFIG_WITH_ARGS --basename`
case $WX_BASENAME in
    *wx_gtk*)
        AC_MSG_RESULT(wxGTK)
        WX_GTK2_CFLAGS="$GTK2_CFLAGS"
        WX_GTK2_LIBS="$GTK2_LIBS"
    ;;

so because none of that checking stuff seems to actually do anything specific to GTK2, try deleting

Code: [Select]
if test "x$HAVE_PKG_CONFIG" = "xyes"; then
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0)
fi

and see what errors you get.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: slow
« Reply #33 on: August 01, 2007, 06:52:49 pm »
configure.in contains:

Code: [Select]
.....

so because none of that checking stuff seems to actually do anything specific to GTK2
.......
and see what errors you get.


gtk2 is needed by the debugger's tooltips. The build will break there if you do this.
Be patient!
This bug will be fixed soon...

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #34 on: August 01, 2007, 07:53:23 pm »
can this be worked around with an #ifdef or two?

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: slow
« Reply #35 on: August 01, 2007, 08:20:31 pm »
gtk2 is needed by the debugger's tooltips. The build will break there if you do this.
How do you do this on windows then? With GTK2, too?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: slow
« Reply #36 on: August 02, 2007, 12:14:20 am »
gtk2 is needed by the debugger's tooltips. The build will break there if you do this.
How do you do this on windows then? With GTK2, too?

Funny. You 're free to fix it then, I don't have the time for it.
Be patient!
This bug will be fixed soon...

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: slow
« Reply #37 on: August 02, 2007, 10:26:24 am »
Funny. You 're free to fix it then, I don't have the time for it.
It's Ok, it's Ok  :). Maybe I will dive a bit into the code I find time.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #38 on: August 02, 2007, 04:06:06 pm »
taking a quick look, you should be able to just comment out these line of plugins/debuggergdb/gdb_tipwindow.cpp (at ~line 39):

Code: [Select]
#ifdef __WXGTK__
    #include <gtk/gtk.h>
#endif

and then make sure wxUSE_POPUPWIN is never #defined...

then bootstrap, configure (with the alteration i suggested earlier), make

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: slow
« Reply #39 on: August 03, 2007, 09:18:29 am »
No this isnt working. I think there is no quick solution to make it faster / working without GTK2. If I comment too much out the debugger wont work anymore and so on.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #40 on: August 07, 2007, 04:46:56 am »
FYI - i managed to get gtk1.2 to compile using the above hacks. however, it:
* is butt ugly :)
* crashes almost immediately even in safemode. (get past the splash screen, cb starts to render then falls over)

from what i observed it is potentially faster, BUT, gtk1.2 doesn't support unicode, so it's not going to be very usable anyway.
« Last Edit: August 07, 2007, 06:45:08 am by dmoore »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: slow
« Reply #41 on: August 07, 2007, 11:38:05 pm »
The other day i talked to Yiannis about this slow bug. He told me he has never experienced it.  :shock: Any ideas of why it happens on some configs and why not on others?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #42 on: August 08, 2007, 05:19:06 pm »
The other day i talked to Yiannis about this slow bug. He told me he has never experienced it.  :shock: Any ideas of why it happens on some configs and why not on others?

I think that ultimately, the problem is that linux has to support a whole host of hardware without the support of the hardware manufacturers. Add to this the multiple levels of GUI APIs: X, GTK, wxWidgets, which are all designed to operate slightly differently and its easy to see that small inefficiencies could scale up to massive problems on some hardware.

The proximate cause is probably the windows centric approach of wxWidgets, especially in its approach to drawing and managing windows, result in very inefficient calls to the underlying GUI APIs of non-windows systems. It could also be that wxWidgets linux support just isn't as mature as windows support and future versions will continue to improve in performance.

Personally, I run ubuntu linux 7.04 on a 1.7ghz speedstep laptop, which is my platform of choice for writing code. I've noticed that the GUI of wx apps just don't seem to perform as well as other apps, but I haven't had the same problems that, say, rotalever reported.

I leave as an exercise to the concerned reader writing a GTK native port of CB. there is an easy way to do this, but there isn't room in the margin to explain.  :lol:

Offline Trigve

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: slow
« Reply #43 on: August 11, 2007, 11:44:27 am »
Hi *,

I've encountered the same problem on my FreeBSD 6.2 box (In my case the CPU usage was 100% high when using arrows to move cursor form the beginnig to the end of the C++ file)... I've tried to find the bottlenecks causing the slowdown with PMC profiling... As was mentioned here, wxWidgets windows-like desgin has (I think) also some impact on this issue...

So when I was profiling the CB I've found some code blocks that was causing slowdowns (Don't remember everything cause it was 1 - 2 months ago and got only some notes written on the paper).

When I have commented the whole SurfaceImpl::MeasureWidth() in wxscitnilla/src/PlatWX.cpp, the CPU went down from 100 % -> 73% - 76%
Next, when I commented out the LayoutLine() operation in wxscintilla/src/scintilla/src/editor.cxx, usage went down to 63%.

I remember I've drop usage to nearly 10% with commenting some other functions (but editor was merely useless).

The PMC implementation I've used doesn't supported the call graphs...but things has changed and now I'm trying to build FreeBSD 7.0 with PMC with call graphs support added... then I'll try to profile CB again a find something new about the issue.

Trigve

Offline roshi

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: slow
« Reply #44 on: August 11, 2007, 04:57:42 pm »
Hi there
Nice to see that someone is working on this problem.
I noticed the CPU spike when scrolling since always.
Eats up 50% of both cores of my Dual Core 2GHz T7200
Apparently is something common to wxGTK apps.
Cuse I remember going through all linux available IDEs and at that time I noticed that some other wx based software also had the same problems.
"Native" stuff like IDEs based on gtk alone or based on QT seem to be unaffected...
Sniff sniff.
Too late to change lib so better just improve the one we have.
It really doesn't make sense. It's only scrolling... :)