Was able to generate profile, to track down some sections.
Under gramps, we have a debug tool/gramplet which shows uncollected objects. Since gramps 4 and use of gtk+3/gi, we have some performance regressions. One issue leads to a freeze and an unstable behavior after some hours.
My guess is that the cause is gramps plugins attributes loaded as objects and never purged (or uncollected). Generated profiles point out 'module.py' from gi! A quick (and dirty) estimation could be that after 3000 uncollected objects (or ~ 10 000 000 calls!), we have some performance issues.
I suppose that I can understand the basics of python, but fixing such issue could be really difficult for myself.
So, is there any way to get rid of __attr__ call from module.py?