Sorry that GTK+ seems to be failing you. Also sorry that I have been unable to help out.
Pages: 1 2
On Wed, 29 Apr 2020 11:39:22 GMT, Russel Winder wrote:
Sorry that GTK+ seems to be failing you. Also sorry that I have been unable to help out.
That's okay, you did try. One of the problems I'm finding is that much as I like D as a language its lack of popularity means it isn't getting the support and attention of say, Go or Rust or Python. And for GUI development D has quite a few bindings plus a couple of "native" D libraries, but because all the effort is so widely spread none of them seem to be really mature or progressing much. If I get the time I'll redo this app in wxPython I guess.
On 29-04-2020 11:10, mark wrote:
I replaced my simple ListStore subclass with an implementation of the TreeModelIF (based on the code in the GtkD demos DemoCustomList example) and updated on github/debfind. And I get exactly the same crash.
If you've any other suggestions I'll have one last try, but otherwise I think I've reached the end of the road with GtkD!
I've tried debugging the issue a bit more, but so far i only succeeded
in changing the error message to:
"This program exited with exit code -11"
which isn't very helpful.
I also found this: https://gitlab.gnome.org/GNOME/gtk/-/issues/1143 only
that is a textview in a scrolledwindow.
On Wed, 29 Apr 2020 14:41:47 GMT, mark wrote:
[…]
or progressing much. If I get the time I'll redo this app in wxPython I guess.
Might it be worth trying Python and GTK+ to see if the problem is with GTK+?
I had assumed wxPython was stuck in Python 2, or did Phoenix work and get relabelled wxPython for Python 3?
On Thu, 30 Apr 2020 18:00:42 GMT, Russel Winder wrote:
On Wed, 29 Apr 2020 14:41:47 GMT, mark wrote:
[…]
or progressing much. If I get the time I'll redo this app in wxPython I guess.Might it be worth trying Python and GTK+ to see if the problem is with GTK+?
I had assumed wxPython was stuck in Python 2, or did Phoenix work and get relabelled wxPython for Python 3?
I've switched to Python 3.6/wxPython 4 (phoenix) which are both in the Ubuntu 18.04 repositories. Phoenix is pretty good.
So far I've ported the model from D to Python. The time to read the files has gone up from 1.4sec to 1.7sec, but once indexing is included the total start time is 6.2sec D vs 3.1sec Python. Also D takes 0.5sec to read the cache while Python takes 0.2sec. I've known for a long time that Python's "slowness" was a myth, but I still forget sometimes. I hope to start on the GUI next week.
I am surprised D is slower than Python, but I am not surprised that Python is not slow. At least in this case, most of the work is likely in native code in both cases.
On Sat, 02 May 2020 18:50:30 GMT, Russel Winder wrote:
I am surprised D is slower than Python, but I am not surprised that Python is not slow. At least in this case, most of the work is likely in native code in both cases.
Yes, most of the Python work is really done by C code.
Also, the model makes heavy use of sets which are native to Python whereas for D I have to simulate them using AAs.
I'm convinced the problem is with GtkD since I've now ported the app to wxPython which uses Gtk under the hood and this can show 1000s of items with no problems: see DebFind/wxPython vs DebFind/D (incomplete).
A priori this surprises me. GtkD is just a binding to GTK. gtk-rs adds extras and so there might be problems added. Maybe the problem is in GTK and wxPython adds extras to get around them. Anyway I am pleased you have a working application.
Pages: 1 2