Re: gtktreeview sooo slow
- From: Mohammed Sameer <Uniball gmx net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtktreeview sooo slow
- Date: Wed, 22 Jan 2003 16:48:37 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Once upon a time Charles Schmidt wrote @ Tue, 21 Jan 2003 02:53:57 -0600
Mohammed Sameer wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
The tree view is soo slow when adding large ammount of data, Is there a way to improve the speed ??
attached the code, Can anyone have a look and point me plz ?
I can give you a few reasons, and a few suggestions. Firstly, fetching
from mysql is probably a fair amount of the speed problem. Combine that
with TreeView's general suckiness its going to be pretty darn slow. As
for fixing it, I can suggest a few things. You could fetch the data
from mysql in a different thread, and when it is all available (I can't
tell/remember if you're using the fetch-all-at-once or the
fetch-incrementally mysql commands) feed it to the Model. You could
yes, but then we'll end with doubling the memory usage ?
fetch the data incrementally and see if that fixes things. You could
not use mysql, but rather something with a bit more speed. More
specifically, you could store the length,genre,volume,mode and track as
numerical values, rather than character arrays.
I'll try that
You could do something
like this:
{
guint i = 0;
while (fetch row) {
if (++i == 30) {
while (gtk_events_pending()) {
gtk_main_iteration();
}
}
add row to list store
}
Well, I didn't well understand what does this do ?
- --
- ----------------
- -- Katoob Main Developer
Linux registered user # 224950
ICQ # 58475622
FIRST make it run, THEN make it run fast "Brian Kernighan".
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Lq9Fy2aOKaP9DfcRAkrpAJ4sdUTdRfyju3UnvhjG2MY+ZXcNZACfZway
IitbSeJSfQDMbxFcB6JTnmE=
=zswe
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]