U4-4292 - RelationService is slow and doesn't appear to be caching properly (v6.1.6)

Created by Scott McClannahan 24 Feb 2014, 18:37:18 Updated by Shannon Deminick 26 Jun 2017, 05:41:32

It appears that the RelationService API performs very slow, compared to other APIs such as ContentService and/or uQuery. For example, loading a list of 50 relations takes about 15 seconds.

Here is an example of the code: var allRelations = _relationService.GetAllRelations().ToList();

I've also tried filtering down relations by type and/or id like this: var dealLocationRelationType = _relationService.GetRelationTypeByAlias(RELATIONTYPE_DEAL_LOCATION); var allDealLocationRelations = _relationService.GetAllRelationsByRelationType(dealLocationRelationType).ToList();

I believe that this is an issue with the underlying code because I am seeing nearly 100 queries executing against the database, however if this is an implementation issue, then I would suggest that we update the documentation as there is very little on the RelationShip API service.

Comments

Вилен Тамбовцев 23 Sep 2014, 09:38:14

Same here. Relation service is awfully slow for large content setups. For me ApplicationContext.Current.Services.RelationService.GetAllRelationsByRelationType(1).ToList(); executes for 22(!) seconds


Shannon Deminick 26 Jun 2017, 05:41:32

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Major

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.2.0, 6.1.6, 6.2.2

Due in version:

Sprint:

Story Points:

Cycle: