From: John R. <jr...@ce...> - 2014-02-26 15:10:27
|
On Feb 26, 2014, at 12:46 AM, Jerome <rom...@ya...> wrote: > John, > > > Agreed about warnings, but here the main problem is also that the user cannot use Note anymore ... :( > > bug #7501: Notes always say "no data exists for note" when saving > > About GObject.idle_add, I guess it is related to work around memory leaks? > https://gramps-project.org/2010/11/memory-leaks-finally-gone/ > > Something for handling threads on Gtk+ applications? > Benny? > > When you say "fix it", do you mean to rather use: > > +from gi.repository import GLib > ... > -self.idle = GObject.idle_add(self.load_model().next) > +self.idle = GLib.idle_add(self.load_model().next) > > or to ignore 'self.idle' ? > > I know that Gtk+ loops and timing issues exist, but as I cannot understand the basics or some OS layers. I am just investigating around the traceback. Sorry, but I am not the one who can properly fix that! > > Note, I can test if new names were already supported on 'old' Gtk+ 3.6. > It is what I did with some minor fix on glade files reported by users under Fedora (I guess!). This is also why I asked for a "4.0.4" release and if we should focus on Gtk+ 3.12 and + for master! Sure, no urgency, and if need, we can also backport to gramps40 branch after deprecation warnings time. > > The possible gain of 25% on time to load might be more interresting. > If confirmed! > I did not understand the half of the message on: https://mail.gnome.org/archives/python-hackers-list/2013-August/msg00005.html > but maybe we could already make a simple test: an optimization test! > > Should we call: > > from gi.repository import Gtk > > ... > Gtk.blabla > > or something like: > > from gi.repository import Gtk.blabla as blabla > > ... > blabla > It's possible that Simon is mistaken about the deprecation warnings and that they're masking something more serious. Perhaps if those are fixed the problem will be resolved or the real problem will reveal itself. But don't confuse Gtk+ and PyGObject. They're different projects, and in this case the user has 3.11.x only for PyGObject; Gtk+ is at 3.10.7. Yes, importing GLib and calling Glib.idle_add is correct. Timing of a single import will be dominated by loading modules and dlopening libraries, so it won't be any faster if you import only one class vs. the whole library. Besides, the thrust of that email was that the potential speedup was obtained by the changes made inside PyGObject; calling applications need only correct the deprecation warnings to get the faster code. Regards, John Ralls |