Author Topic: slow  (Read 32465 times)

rotalever

  • Guest
Re: slow
« Reply #15 on: July 29, 2007, 08:11:27 pm »
Weird... I cannot compile it anymore.  :shock:
./configure:
Code
checking for wx-config... no
configure: error:
                wxWidgets must be installed on your system.

                Please check that wx-config is in path, the directory
                where wxWidgets libraries are installed (returned by
                'wx-config --libs' or 'wx-config --static --libs' command)
                is in LD_LIBRARY_PATH or equivalent variable and
                wxWindows version is 2.6.0 or above.
wxWidgets is installed (2.8.4) with the official Packages. But wx-config is not available. That is unbelievable. I deinstalled wxWidgets and replaced it with a selfcompiled one. Now, I deinstalled that and installed wxWidgets as it was before.

rotalever

  • Guest
Re: slow
« Reply #16 on: July 30, 2007, 06:09:12 pm »
Okay, wx-config has been in /etc...
Changing the suggested lines it is slightly faster but it is still lagging and way to slow. Besides, the interface is now unusable. It would be great, if I could compile it with gtk1 (-wxwidgets). That would make things faster.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #17 on: July 30, 2007, 08:04:24 pm »
Besides, the interface is now unusable.

that's because it was intended to isolate the cause, not be a fix...

I find it quite strange that CB is slow only on some machines/distros and not all. are you running 64bit or 32bit ubuntu? it could be a 64 bit problem. Alternatively, have you tried different graphics drivers? CB may be firing off too many events, but this might only cause significant delay on 64bit platforms or on machines with bad graphics drivers.

rotalever

  • Guest
Re: slow
« Reply #18 on: July 31, 2007, 11:10:56 am »
that's because it was intended to isolate the cause, not be a fix...
Yeah, I know...  :D

As I said in my first post, I have an AMD XP2200+ which is a good old 32bit machine. My graphics drivers are those proprietary drivers from nvidia. The latest version, ubuntu provides. I really need those drivers because I am also developing with OpenGL.

rotalever

  • Guest
Re: slow
« Reply #19 on: July 31, 2007, 01:30:28 pm »
Another two things I noticed:
Selecting text with the mouse...

....in the message window: quite fast/no lagging, nothing special about it

....in the editor window: slow/lagging, some noise comes out of my PC. I tested the HDD with wmhdplop -> It is not the HDD making the noise. What is it then? Maybe the graphics card, because it is the same noise I sometimes hear while using 3D applications...

You see the difference? The editor is really doing something stupid here!

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #20 on: July 31, 2007, 03:02:41 pm »
didn't you say some of the wx samples gave you problems (in which case it is not just the editor) or were they resolved when you compiled wx yourself?

rotalever

  • Guest
Re: slow
« Reply #21 on: July 31, 2007, 05:20:01 pm »
Yes, the wx sample from their homepage. The HTML viewer and the example which shows all the different widgets (->textbox widget). Both have the same problem if I select text with the mouse or edit it. Those examples have a build-in wx, selfcompiling wx changes nothing. I think self compiling wx will not make things that faster.
I have the problems in both samples and in the editor of CB. But the message window of CB is very fast...

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #22 on: July 31, 2007, 06:35:42 pm »
well, i think the next step is to try running callgrind (part of valgrind) to see where the bottlenecks are. I suggest running on the html viewer sample spending a lot of time manipulating the laggy bits of the UI (it will take forever to do a callgrind on cb itself, especially in its non-functioning state). some of the other guys here might be able to tell you how to tune a callgrind run...

the other thing to try would be gradually commenting out/switching off various bits of the html viewer sample to isolate the cause of the lag.

also in cb, have you tried creating a new resource in wxSmith -- do you have lag in the wxSmith resource editor?

it's hard to help much more than this because i don't have a machine that has these problems... Unless there is a problem with a specific wx widget or feature there may be little than can be done by the cb devs.

rotalever

  • Guest
Re: slow
« Reply #23 on: July 31, 2007, 08:13:12 pm »
it's hard to help much more than this because i don't have a machine that has these problems... Unless there is a problem with a specific wx widget or feature there may be little than can be done by the cb devs.
Yeah, thats true, but I asked this in the wxWidgets forums and someone said:
"I don't think anyone knows why, but wx apps using gtk2 do take a long time to render. There's no 'quick' fix for this. "
I can now profile the whole thing etc., but in my opinion this will not help. The user also said I should use GTK1 instead of GTK2 because it is much faster. I would do this, but CB does not compile with GTK1.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #24 on: July 31, 2007, 08:30:41 pm »
The user also said I should use GTK1 instead of GTK2 because it is much faster. I would do this, but CB does not compile with GTK1.

how about compiling a revision from before the recent update to the latest wxFlatNotebook? (I think it has introduced a number of incompatibilities with wx2.6.3). if that compiles then it shouldn't be too hard to come up with patches to the latest wxFlatnotebook.

try checking out rev 4310... (usual svn checkout command with additional option "-r 4310") (you could also svn update to it to save bandwidth, but that might create more hassles than it's worth)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: slow
« Reply #25 on: July 31, 2007, 08:34:16 pm »

Gimpmaster

  • Guest
Re: slow
« Reply #26 on: August 01, 2007, 07:07:15 am »
I just wanted to add that I am having the same slow problems.

He is also correct in saying that I can scroll and mouse select text extremely fast in the build messages window but trying to do so in the main editor window is dang slow as well as scrolling up and down with the cursor and arrow keys.

Disabling Code Completion does help but not a ton. Besides CC is the main reason why I'm using code blocks.

Hopefully a fix will find its way...thanks.

rotalever

  • Guest
Re: slow
« Reply #27 on: August 01, 2007, 09:58:00 am »
You said I should use an older version of CB and tried that. But this doesnt compile with wxWidgets-GTk1 aswell.
Code
make[4]: Betrete Verzeichnis '/home/aaaah/codeblocks4310/src/plugins/debuggergdb'
/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/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -I../../../src/include -I../../../src/include/wxscintilla/include -I../../../src/include/scripting/include -I../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT gdb_tipwindow.lo -MD -MP -MF .deps/gdb_tipwindow.Tpo -c -o gdb_tipwindow.lo gdb_tipwindow.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/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../src/include -I../../../src/include/wxscintilla/include -I../../../src/include/scripting/include -I../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT gdb_tipwindow.lo -MD -MP -MF .deps/gdb_tipwindow.Tpo -c gdb_tipwindow.cpp  -fPIC -DPIC -o .libs/gdb_tipwindow.o
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from gdb_tipwindow.cpp:40:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined
In file included from /usr/include/glib-2.0/glib.h:68,
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:32,
                 from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
                 from /usr/include/gtk-2.0/gdk/gdk.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:31,
                 from gdb_tipwindow.cpp:40:
/usr/include/glib-2.0/glib/gspawn.h:113:63: warning: this is the location of the previous definition
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from gdb_tipwindow.cpp:40:
/usr/include/gtk-2.0/gtk/gtkobject.h:46:1: warning: "GTK_OBJECT_GET_CLASS" redefined
In file included from /usr/include/glib-2.0/glib.h:68,
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:32,
                 from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
                 from /usr/include/gtk-2.0/gdk/gdk.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:31,
                 from gdb_tipwindow.cpp:40:
/usr/include/glib-2.0/glib/gspawn.h:112:63: warning: this is the location of the previous definition
/usr/include/gtk-2.0/gdk/gdktypes.h:76: error: conflicting declaration 'typedef struct _GdkAtom* GdkAtom'
/usr/include/wx-2.6/wx/defs.h:2761: error: 'GdkAtom' has a previous declaration as 'typedef gulong GdkAtom'
/usr/include/gtk-2.0/gdk/gdktypes.h:102: error: conflicting declaration 'typedef struct _GdkDrawable GdkBitmap'
/usr/include/wx-2.6/wx/defs.h:2763: error: 'GdkBitmap' has a previous declaration as 'typedef struct _GdkWindow GdkBitmap'
/usr/include/gtk-2.0/gdk/gdktypes.h:103: error: conflicting declaration 'typedef struct _GdkDrawable GdkPixmap'
/usr/include/wx-2.6/wx/defs.h:2764: error: 'GdkPixmap' has a previous declaration as 'typedef struct _GdkWindow GdkPixmap'
/usr/include/gtk-2.0/gdk/gdktypes.h:104: error: conflicting declaration 'typedef struct _GdkDrawable GdkWindow'
/usr/include/wx-2.6/wx/defs.h:2762: error: 'GdkWindow' has a previous declaration as 'typedef struct _GdkWindow GdkWindow'
make[4]: *** [gdb_tipwindow.lo] Fehler 1
make[4]: Verlasse Verzeichnis '/home/aaaah/codeblocks4310/src/plugins/debuggergdb'

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: slow
« Reply #28 on: August 01, 2007, 10:02:43 am »
You said I should use an older version of CB and tried that. But this doesnt compile with wxWidgets-GTk1 aswell.

You're still using GTK2. Plus you're using ANSI build of wxGTK which is not the recommended.
Be a part of the solution, not a part of the problem.

rotalever

  • Guest
Re: slow
« Reply #29 on: August 01, 2007, 12:57:01 pm »
Howto disable GTK2 then?? I build wxWidgets with GTK1
Code
../configure --disable-gtk2  --enable-optimise --enable-shared --disable-debug --disable-profile --prefix=/usr --with-gtk=1 --disable-unicode
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...

Here is the output of CB's configure script if I deinstalled GTK-2.0-dev
Code
checking for GTK2... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:

No package 'gtk+-2.0' found
« Last Edit: August 01, 2007, 01:06:42 pm by rotalever »