Page 1 of 1

IsAncestorOf Makes Diagrams Really Slow

Posted: 13 Sep 2014 18:21
by davidm_uk
After reading the post "Help - direct line indication in Record view" I experimented with adding the expression =IsAncestorOf(%INDI%,FileRoot()) into Diagram > Options > Boxes tab and using it to display the ancestor line boxes in a different colour. I put the expression up to the top of the priority list.

At first glance it seemed to work ok.

Having spent a while entering some more data I suddenly noticed the the All Relatives diagram I was using had become really slow when moving around it, with the cursor flickering for a second or two between moves, and photos in the boxes taking ages to redisplay.

After some experimentation, including reinstating a gedcom file from before made the change, with no improvement on the diagram speed, I removed the expression. Closed FH and restarted it and lo and behold the diagram speed was back to near instantaneous, including the photos.

Maybe the expression works better with flags, but I already have quite a few flags in use, so wanted to use something else to highlight the ancestor line.

I'm not overly worried about it not working very well, but thought I'd flag it up in case anyone else falls over this behaviour.

Re: IsAncestorOf Makes Diagrams Really Slow

Posted: 13 Sep 2014 19:01
by tatewise
Yes, that is rather odd, but there is a workaround.
Interestingly, the problem does not afflict the =IsDescendantOf() function.

So simply use the following Expression instead:
=IsDescendantOf(FileRoot(),%INDI%)
i.e.
If the FileRoot() is a descendant of %INDI% then %INDI% is an ancestor of FileRoot().
QED

Re: IsAncestorOf Makes Diagrams Really Slow

Posted: 14 Sep 2014 12:46
by davidm_uk
Yes, =IsDescendantOf(FileRoot(),%INDI%) works fine here.

Thanks Mike.

Re: IsAncestorOf Makes Diagrams Really Slow

Posted: 15 Sep 2014 09:08
by SimonOrde
Thanks for pointing this out. We will fix it in the next release so that both versions are fast.