# How is the Relationships view so responsive?

**URL:** https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802
**Category:** Help
**Created:** [September 23, 2022, 5:51am UTC](https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802 "2022-09-23T05:51:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)
#### Post date: [September 23, 2022, 5:51am UTC](https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802/1 "2022-09-23T05:51:05Z")

</div>

How does the Relationships view populate so quickly?

When switching persons in the Relationships view using the example.gramps tree, the view mode updates on my Windoze box in less than a second.

 ![](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/a/a56e978d28eb54310d3f67f6dcb1cf0457e7d61c.png)  
That refresh time includes changing focus, finding the Families that have the Active Person as a child or spouse, all the people in those families, the marriage events for the Families, the birth & death events for all the people, all the Places for those events, and thumbnails for those people. Then it has to build a appropriate layout around all those objects.

All in less than a second.

It is often useful to run a filter that finds a subset of those: all the objects in one View category for immediate family of the Active Person. And to do that, Gramps requires a (divergent set of rules for each Category) complex mulit-stage custom filter. And it has a painfully slow progress bar for each stage.

What is the difference in the way the Relationship view finds this subset of the Tree? Is there a way to grab the populating method for the Relationship view and layer it into a narrow scope modality for the other views?

---

<div class="post-metadata">

### Author: ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)
#### Post date: [September 23, 2022, 11:40pm UTC](https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802/2 "2022-09-23T23:40:17Z")

</div>

Looking at the [gramps/plugins/view/relview.py starting at Line 618](https://github.com/gramps-project/gramps/blob/master/gramps/plugins/view/relview.py#L618), it doesn’t builds lists from queries. It calls functions to return lists of handles from that class.

So… I suppose the budding developers need a great cheatsheet so they don’t re-invent the wheel.

from [gramps/gen/lib/person.py#L883](https://github.com/gramps-project/gramps/blob/458989f47aed00ed33331c8760f8049266f3495a/gramps/gen/lib/person.py#L883)  
family\_handle\_list = person.get\_family\_handle\_list()

```auto

    def get_family_handle_list(self):
        """
        Return the list of :class:`~.family.Family` handles in which the person
        is a parent or spouse.
        :returns: Returns the list of handles corresponding to the
                  :class:`~.family.Family` records with which the person
                  is associated.
        :rtype: list
        """
        return self.family_list

```

from [gramps/gen/lib/person.py#L934](https://github.com/gramps-project/gramps/blob/458989f47aed00ed33331c8760f8049266f3495a/gramps/gen/lib/person.py#L934)  
family\_handle\_list = person.get\_parent\_family\_handle\_list()

```auto
    def get_parent_family_handle_list(self):
        """
        Return the list of :class:`~.family.Family` handles in which the person
        is a child.
        :returns: Returns the list of handles corresponding to the
                  :class:`~.family.Family` records with which the person is a
                  child.
        :rtype: list
        """
        return self.parent_family_list

```

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)
#### Post date: [October 23, 2022, 11:40pm UTC](https://gramps.discourse.group/t/how-is-the-relationships-view-so-responsive/2802/3 "2022-10-23T23:40:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
