Fixes U4-9678 - XPath Syntax Parser slowdown

http://issues.umbraco.org/issue/U4-9678

Swaps out the base XPath from `"descendant::*[@id={0}]"` to `"id({0})"` - making use of the content-cache's XML DTD ID index.

This will perform better on larger content-trees.
This commit is contained in:
leekelleher
2017-03-25 12:50:53 +00:00
parent 3d81c73495
commit 169c6b6372

View File

@@ -60,7 +60,7 @@ namespace Umbraco.Core.Xml
return -1;
});
const string rootXpath = "descendant::*[@id={0}]";
const string rootXpath = "id({0})";
//parseable items:
var vars = new Dictionary<string, Func<string, string>>();