Deep Connections gramplet enhancement

For me, the most annoying is the Deep Connections Gramplet, which needs multiple minutes for searches that take only 1 or 2 seconds on Geneanet.

The user’s problem can be handled with Gramps, and probably better than with PAF, although its advanced filters are quite good, and more interactive than ours. The problem is, that selecting people who are ancestral related in that does not the same as Gramps does, and selects way more people than one might need.

As far as I’m concerned there’s not much need for tagging, and I only use tags for things like marking people as family who are actually inlaws of inlaws. The user’s problem, selecting people who share an ancestor with him, is quite easy to solve, also if he wants to include spouses, which is normally what you want. It may take a while, but since it normally is a one time operation, it’s not that bad.

I have some big trees, one over 600,000 people, and Gramps is slow. And TBH, I would never recommend Gramps to anyone with over 100,000 people. because they will definitely run into problems with the Deep Connection Gramplet, and a few other tools maybe.

2 Likes

To follow up on the performance of the Deep Connections Gramplet, which has annoyed me for years, I need to add that I did some analysis of the code, which has a few errors that cause it to process the same person multiple times, but after correcting those, it’s still slow.

And now that I know that the algorithm itself is better, I’m beginning to think that the real problem is in the database, which has no quick way to retrieve persons’ relatives. And that’s because there’s no table for that, like in PAF or RootsMagic, so that for each person, you need to retrieve the blob data from the database, unpickle that, and process the Python object to find the handles of associations, which often aren’t there. So, for most relaties, you need to find the family handles, retrieve the family objects, and unpickle those too. And that’s much much slower than with a database that stores all such relations in a separate table, like the other programs do.

I wonder if the Deep Connections feature would be more appropriate as a Quick Report instead of as a Gramplet?

As a Gramplet, its excessive and continuous updating turns Gramps into a giant sloth… spawning endless “Gramps is not responding” warning dialogs, consuming huge chunks of memory and CPU cycles. And while there could be Config options (like whether to consider Note links, shared Events, and Associations), none have ever been enabled. So the lack of any configure option for Quick Reports is irrelevant.

Similarly, the Deep Connections Graph dashboard gramplet/launcher by @kku would make an interesting “Murder Board” Quick Report. That would lose the dynamic updating for focus shifts and options. But having to launch a local server to feed it content and communicate the “active record focus” navigation back to the Gramps engine scares too many users.

A murder board (aka: evidence board, conspiracy board, murder map, crazy wall) feature could become a good tool for theorizing connections and network analyses.

I’d be glad to revisit the implementation. I wrote that more than 15 years ago. A lot has changed, including me :slight_smile:

4 Likes

Thanks for that offer. It would wonderful to have it updated!

I use Deep Connections output frequently in eMail conversations. It allows quick copy’n’paste of the outline of a relationship to a distant cousin. (Although since it connects via siblings, I always must insert the parents as a connective block between the siblings for clarification. Any time I fail to do so, the cousins ask a followup.)

Sometimes it is necessary to temporarily break up a family to avoid diversions too. (Such as when an ancestor married a removed cousin or when siblings had in-laws who were siblings.)

My other option is to paste trimmed copies of their and my Pedigree Gramplet output.

Also, the Consanguinity Gramplet is a fast, fast way to find multiple paths to common ancestors with a cousin. Unfortunately, it is necessary to trick it into doing so. The
Workaround is to set up a temporary family with the cousins as spouses.

Meh. I wouldn’t like it to change too much. I use it regularly and it would bore me.

If you do revisit it, I’d like to see an improvement in finding multiple relationships.

All too often, if I look for additional relationships, all I get is a minor variation using a different sibling at some point in the relationship or something similar. In my research I have followed a lot of branches that are only connected through a marriage to a distant relative or whatever. But there are some that I know are connected to two or more of my great-grandparents but Deep Connections only finds minor variations of one of the connections. I don’t know if it would eventually find the other connections if I checked enough relationships, but with large families that might take a very long time.

1 Like

I use Deep Connections frequently. I’d be grateful if the most recent common ancester were included in the connection path.

3 Likes

For those interested in trying an updated DeepConnectionsGramplet, the source code is here:

https://raw.githubusercontent.com/gramps-project/addons-source/refs/heads/maintenance/gramps60/DeepConnectionsGramplet/DeepConnectionsGramplet.py

You can simply overwrite your existing one.

This version doesn’t change the algorithm very much, but it does update the UI much more often to let you know what it is doing. It seems very fast on a 30k tree that I have. But let me know what you find.

[I forget what needs to be done to let @GaryGriffin know that it is ready for packaging]

2 Likes

I didnt see a PR for this change. Usually I let a PR sit in the queue for a few days to get comments before merging / publishing.

You dont need to update the version in the gpr file as this is done as part of the publish process.

I published this change just now.

3 Likes

Thank you! I’ll make a PR next time.

1 Like

The new release makes much, much better use of resources. It doesn’t seem to slow Gramps 6 at all.


1.0.47 in Gramps 6.0.4 versus 1.0.42 in Gramps 5.2.2

I had not recalled that the Copy was to populate the Gramps clipboard with the related People. (This is useful for using the clipboard’s context menu to quickly create a custom filter.)

You have to use the context menu in the Deep Connection gramplet to clipboard the relationship information. Here’s the 6 relationships found between 3rd cousins in the Example.gramps sample data. (It still side-steps through siblings and the unrelated parent.)

Looking for relationship between
  Evans, Michael Patrick (Home Person) and
  Warner, Matthew Steven (Active Person)...
Found relation #1: 
   Warner, Matthew Steven [third cousin]
   child of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.
Found relation #2: 
   Warner, Matthew Steven [third cousin]
   sibling of Warner, Sarah Suzanne [third cousin] 
   child of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.
Found relation #3: 
   Warner, Matthew Steven [third cousin]
   sibling of Warner, James Jeffrey [third cousin]
   child of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.
Found relation #4: 
   Warner, Matthew Steven [third cousin]
   sibling of Warner, Carl Thomas [third cousin]
   child of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.
Found relation #5: 
   Warner, Matthew Steven [third cousin]
   sibling of Warner, John Allen [third cousin]
   child of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.
Found relation #6: 
   Warner, Matthew Steven [third cousin]
   child of Warner, Allen Carl
   husband of Garner, Rita Marie [second cousin once removed (up)]
   child of Garner, Howard Lane [first cousin twice removed (up)]
   child of Reed, Frances Lucille (Babe) [great grandaunt]
   sibling of Kristensen, Anna June [great grandmother]
   mother of Rhodes, Mary Jane [grandmother]
   mother of Evans, James Patrick [father]
   father of Evans, Michael Patrick
Paused.
Press Continue to search for additional relations.

Search completed. 6 relation paths found.
1 Like

Graphing the relationship is another adventure.

I started with Deep Connections Graph (launched from a dashboard category “local server” gramplet) and was … baffled … by the output:


@kku what are the numbered boxes?

1 Like

Then I tried the relationship Consanguinity experimental gramplet by @ukulelehans after manually installing and tweaking the registration for 6.0.

It only graphs direct relationships between spouses rather than a pair of selected cousins. (click on the relationship in the Gramplet to spawn the diagram.) So it required creating a temporary Family with the cousins as spouses:

I already knew that FamilyTreeView FTV addon Charts view by @ztlxltl would give the cleanest graph. But it would require some Configure tweaking. (My tweaks start by reducing the line weight of the boxes from 2.0 to 0.5, and to not display ribbons in Appearance; choosing the Compact in Boxes.)

You have to start from finding a common ancestor an making them the active person. Then increase the number of generations automatic shown.


Then I applied the custom filter from the clipboarded Deep Connection related persons:

There was too much content. So the Experimental Configure option to “Prune people who do not match the sidebar filter” helps winnow it down.

The side expanders indicated that there were some blended families. So it is worth expanding those … just in case you had induced some hallucinations with some hypothetical families.

2 Likes

I really don’t know! Have to investigate.

2 Likes

Fixed. Anyway, FTV is probably superior to “Deep Connections Graph” (which is not very stable or polished).

1 Like

Nice! (This capture after tweaking the updated version 1.2.7 connections.py Relationship labels into English.)

FTV has more rendering quality options. But not nearly so many connection types. The ability to discover Association and Notes linkages in a compact form is a very useful detective tool

vanhempi
lapsi
puoliso
sisarus
kummi
Kummi
päähenkilö
Päähenkilö

parent
child
spouse
sibling
godparent
Godparent
home person
Home Person

1 Like

Yes, I really like it !

This is from 2021 tests, here and here. Rendering have changed.

1 Like