Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Why is GTK Chameleon slow
Why is GTK Chameleon slow [message #7862] Sat, 27 January 2007 12:09 Go to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
Recently there were complaints about slower application load times in linux since Gtk theming was introduced.

Now we have found why and why we have not noticed during development:

We are developing in ubuntu/gnome. When we are linking to gtk shared libs, they are already loaded into the memory and everything is fast.

OTOH, if you start U++ app from non-GTK environment and there is no GTK in memory yet, it has to be loaded and that is what causes the slowdown.

Mirek
Re: Why is GTK Chameleon slow [message #7863 is a reply to message #7862] Sat, 27 January 2007 12:37 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member
luzr wrote on Sat, 27 January 2007 12:09


OTOH, if you start U++ app from non-GTK environment and there is no GTK in memory yet, it has to be loaded and that is what causes the slowdown.

Mirek


One idea I had was, if upp could save gtk themes to disk, instead of recreating them every time. Then upp would only need to poll the Xserver for gtk theme switch messages.
For perfection we needed to listen to theme change messages anyway, to let upp apps follow theme changes on the fly, as gtk apps do.
I consider custom themes in absence of gtk an asset also in case upp apps are written for embedded, like info terminals or cash systems etc. You want to slim down such installs as much as possible, but still easily customize looks.
Also that feature is a safe-guard against breakage from gtk ABI change, if we don't get that perfectly right. And can we really ever be sure about that?

Guido
Re: Why is GTK Chameleon slow [message #7864 is a reply to message #7863] Sat, 27 January 2007 12:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
guido wrote on Sat, 27 January 2007 06:37

luzr wrote on Sat, 27 January 2007 12:09


OTOH, if you start U++ app from non-GTK environment and there is no GTK in memory yet, it has to be loaded and that is what causes the slowdown.

Mirek


One idea I had was, if upp could save gtk themes to disk, instead of recreating them every time. Then upp would only need to poll the Xserver for gtk theme switch messages.
For perfection we needed to listen to theme change messages anyway, to let upp apps follow theme changes on the fly, as gtk apps do.
I consider custom themes in absence of gtk an asset also in case upp apps are written for embedded, like info terminals or cash systems etc. You want to slim down such installs as much as possible, but still easily customize looks.
Also that feature is a safe-guard against breakage from gtk ABI change, if we don't get that perfectly right. And can we really ever be sure about that?

Guido


The problem is that gtk chameleon is actually using GTK to draw things....

Mirek
Re: Why is GTK Chameleon slow [message #7865 is a reply to message #7864] Sat, 27 January 2007 13:18 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member
Quote:

The problem is that gtk chameleon is actually using GTK to draw things....


I didn't know that.
Imagined it went through all the widgets at startup and merely cached the bitmaps.
So that can't be done. I liked the idea.
But, o well, more important things left to do.
Like dealing with spaces in Unix filenames.
Hint, hint Very Happy

Guido
Re: Why is GTK Chameleon slow [message #7866 is a reply to message #7865] Sat, 27 January 2007 15:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
guido wrote on Sat, 27 January 2007 07:18

Quote:

The problem is that gtk chameleon is actually using GTK to draw things....


I didn't know that.
Imagined it went through all the widgets at startup and merely cached the bitmaps.
So that can't be done. I liked the idea.



Yes does not sound bad. In any case, I will add it to my mental list of development options...

BTW, any idea how to detect Gtk theme change?

Quote:


But, o well, more important things left to do.
Like dealing with spaces in Unix filenames.
Hint, hint Very Happy



Must be dumb today (dealing with this GTK mess makes me dumb perhaps). Can you be more specific?

Mirek
Re: Why is GTK Chameleon slow [message #7870 is a reply to message #7866] Sat, 27 January 2007 23:27 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member

E.g. UWord:
Save a file with white space in the filename and it will be trimmed at the first space.
Rename the file just created, so it contains white space again. Now open it. You get a file not found error. Ignore and it will be loaded anyway.

This is a long standing bug of the Linux port.
You have it in the TODO file. At least the last time I looked (it's no longer included in the packages or has moved).

Quite a shop-stopper, actually.
I briefly tried to fix it half a year ago. But stopped at DeQtf() something in the debugger, realising I knew too little about upp's internal text handling at this point.

Guido

Re: Why is GTK Chameleon slow [message #7871 is a reply to message #7866] Sat, 27 January 2007 23:42 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member
Quote:

BTW, any idea how to detect Gtk theme change?


From the top of my head, I can point to the xsettings system, which gtk uses.

http://www.freedesktop.org/wiki/Standards/XSettingsRegistry

It was intended as to be used by other toolkits, but didn't take off. So now it is deprecated and expected to be replaced for a dbus based solution. Don't know where this leaves us.

Guido

[Updated on: Sat, 27 January 2007 23:44]

Report message to a moderator

Re: Why is GTK Chameleon slow [message #7891 is a reply to message #7870] Mon, 29 January 2007 15:56 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Guido,

Is the "space in the filename" problem just when using U++, or do you think it is a deeper issue?

Thanks for alerting me to this problem -- it is the kind of thing that would cause me to pull hair (and I have so little left Wink

Re: Why is GTK Chameleon slow [message #7892 is a reply to message #7891] Mon, 29 January 2007 16:51 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member
ebojd wrote on Mon, 29 January 2007 15:56

Guido,

Is the "space in the filename" problem just when using U++, or do you think it is a deeper issue?

Thanks for alerting me to this problem -- it is the kind of thing that would cause me to pull hair (and I have so little left Wink




Something goes wrong, when upp converts Unix filenames from/to its RichText representation. It's probably easy to fix.

Guido
Re: Why is GTK Chameleon slow [message #7897 is a reply to message #7892] Tue, 30 January 2007 22:26 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
It is just a bug in FileSel. In fact, it is rather feature, if you enter spaces between names, it thinks you are entering more than single filename (I agree it is not quite logical and it should now be fixed, multiple selection is allowed in Open mode only).

It works in Win32 now, but I have to test it in Linux yet.

Mirek
Re: Why is GTK Chameleon slow [message #7901 is a reply to message #7870] Wed, 31 January 2007 00:14 Go to previous message
mirek is currently offline  mirek
Messages: 12050
Registered: November 2005
Ultimate Member
guido wrote on Sat, 27 January 2007 17:27


E.g. UWord:
Save a file with white space in the filename and it will be trimmed at the first space.
Rename the file just created, so it contains white space again. Now open it. You get a file not found error. Ignore and it will be loaded anyway.

This is a long standing bug of the Linux port.
You have it in the TODO file. At least the last time I looked (it's no longer included in the packages or has moved).

Quite a shop-stopper, actually.
I briefly tried to fix it half a year ago. But stopped at DeQtf() something in the debugger, realising I knew too little about upp's internal text handling at this point.

Guido




Hopefully fixed....
Previous Topic: Pre-compiled headers support for MinGW
Next Topic: U++ and Vista
Goto Forum:
  


Current Time: Sun Oct 20 00:10:57 CEST 2019

Total time taken to generate the page: 0.01363 seconds