-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issue #11
Comments
Unfortunately, I can’t deal with that right now, but I'll look at it as soon as I have time. |
In my experience, pixmap themes in ttk can be slow with a large number of widgets if the pixmaps contain an alpha channel, which the PNG images of this theme do. The only reliable way to speed it up is to convert the images to a format like GIF, where pixels can be absolutely transparent but not partially. To do this nicely, it is required to blend the partially-transparent pixels with the background colour of choice and then convert to a GIF file. Sometimes a bug may exist in a theme that makes it slow and a small adjustment can help. I think this has little to do with the theme itself, and mostly with Tk/ttk. Tk/ttk was just not built in a time when transparency was available in most image formats, let alone used a lot in UIs. Making themes without true alpha channels is merely a work-around for an issue that will probably never go away. But it's a good, reliable work-around nonetheless. |
I think the complete elimination of the alpha channel as a good idea, but there is something else here. I’ve noticed that inside a |
In v1.4 I tried to remove all the transparency, unfortunately, it still remains, but on Ubuntu, it works perfectly well, but I'm not happy with the performance of Windows, although it might be possible with gifs, unfortunately, I'm not friended with them, so this won't happen for a time. |
Alright rbende. But i dont now really need to work on GUIS but for the next project ill need GUIS will see :) |
Thanks for the tip, I wrote my own Pillow converter, so that's no problem now. I know it would have been faster with some ImageMagick and shell stuff, but I prefer Python and Pillow. |
@RedFantom Does your fork solve(/improve) the performance issue? |
How about SVG images?? What is the reason the Sunvalley SVG version exsists? |
The SVG-based theme was just an experiment with the Tksvg package, and in theory it should improve the appearance on high DPI displays, tho I couldn't try it out. |
@bosd The fact that Tkinter is slow when using PNG-pixmap themes is well-documented, and this may be alleviated by using GIF-pixmap themes. If you need higher performance than a GIF-pixmap theme can provide, you have to look outside of pixmap themes altogether. I'd like to point out that @rdbende has made a GIF version also, and it's probably better than my quick-and-dirty conversion. SVG probably makes it worse, especially on first load, because the images have to be rendered to pixmaps before they can be used by Tkinter. The high DPI images will be bigger, and hence the transformations that are applied to build UI elements from them will probably be a bit slower indeed. I think on low DPI screens it should not make (much of) a difference. |
The UI framework is INCREDIBLY leggy/slow. Please fix this issue because it looks very good and I will like to use it in my future projects. I noticed the images are the main thing that are slow.
The text was updated successfully, but these errors were encountered: