I want to rank how strongly connected instances of Entity A are to other instances or Entity A are in my graph.I only need to do this for the n most recently viewed entities. I describe relations between two instances of Entity A by means of another Entity B. This is because I need to describe each relationship.
I was considering using a fetched property like so:
ANY isSourceOfRelation.destinationThing == "$SOURCE_THING"
OR ANY isDestinationOfRelation.sourceThing == "$SOURCE_THING"
But I am wary of doing so because I doubt it will evaluate this via relations but via an exhaustive search. This would not be such a problem on the desktop but on iPhone it would not be practical with my dataset.
As Fetched Properties are lazily evaluated and subsequently cached I could perhaps access the fetched property on every single object on the desktop but would this cache be maintained in the sqlite store?
My alternative to this would be to dynamically evaluate this by accessing every Entity B to retrieve the destination Entity A and subsequently add these to a dictionary.
The graph has 10,000 Entity A and about 30,000 relations between them (entity B).
My priority is performance.
What do you think?