Publishing performance issue in Umbraco 17 when using a custom IUrlProvider / NewDefaultUrlProvider

Hi everyone,

I’m hoping someone can help me understand a performance issue I’ve run into after upgrading a project from Umbraco 13 to Umbraco 17.

In Umbraco 13, I had a custom URL provider inheriting from DefaultUrlProvider. In that version, GetUrl() was only executed when the URL for a specific node was required, and publishing a parent node did not cause URL lookups for all of its descendants.

In Umbraco 17, I have tried both implementing IUrlProvider directly and inheriting from NewDefaultUrlProvider, but the behavior seems to have changed quite significantly. When I publish a single node (for example, a category page), Umbraco now appears to execute GetUrl() for every descendant node under it. One of my sections contains over 800 nodes, and my custom URL logic performs a database lookup for each one. This causes publishing to become extremely slow, sometimes timing out or never completing the “Save and Publish” action in the backoffice.

I’m trying to understand whether this is expected behavior in Umbraco 17.
Is the URL pipeline designed to recalculate URLs for an entire subtree whenever a parent node is published?
If so, what is the recommended way to implement custom URL logic that depends on external data such as a database query? And is there any supported way to avoid a full subtree URL rebuild during publishing?

Any guidance or clarification would be greatly appreciated.
Thank you very much in advance!

1 Like

I contacted support and got this reply:

”This is entirely expected behavior.
The re-implementation of caching in V15 has split content cache from URL cache, allowing for a more efficient memory usage while still keeping all pages routable.

We would be quite careful with live DB lookups when calculating URLs. In principle, a URL can be recalculated at any time, or requested by custom code, for that matter.
We’d suggest you implement a caching mechanism for the data required for calculating URLs.”

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.