U4-2171 - Performance Umbraco.Core.Services.ContentService

Created by Joost van den Berg 01 May 2013, 12:33:53 Updated by Sebastiaan Janssen 01 May 2013, 15:56:15

I have a simple razor partial:

Umbraco.Core.Services.ContentService cs = new Umbraco.Core.Services.ContentService(); var nodes2 = cs.GetChildren(1379); foreach (var node2 in nodes2) {

}

-> Time elapsed (ms): 18


var node = new umbraco.presentation.nodeFactory.Node(1379); foreach (var nodes in node.Children) {

}

-> Time elapsed (ms): 0

I use a local db, is there some cashing mechanism wich i can enable for Umbraco.Core.Services.ContentService?

Comments

Sebastiaan Janssen 01 May 2013, 15:56:12

That's because the contentservice is not meant for querying in the frontend, please refer to the following documentation:

http://our.umbraco.org/documentation/Reference/Mvc/querying


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.6

Due in version:

Sprint:

Story Points:

Cycle: