1
votes

In one of my project, I used Umbraco v4.7.1, asp.net 4, Windows 7, SQL Server 2008 & IIS 7. I got a speed issue in more than one page. When I put trace on my code I found that the performance issue is due to the code

myDocument.Publish(createdUser);
umbraco.library.UpdateDocumentCache(myDocument.Id);

I found that it took ~21 sec.

Please help me anyone to increase the performance

TraceStart beforepublish 26/07/2012 12:01:59  0.715882046461212  0.000089
Traceend   afterpublish  26/07/2012 12:02:19 21.5144408018338   20.798559
1
Your code does not show your tracing statements. What's taking time, the call to Publish, the call to UpdateDocumentCache, or both?sisve
How many nodes are in your content tree?BeaverProj
Also, what version of Umbraco and how many properties on the DocType you are creating?BeaverProj
@pooja : if your content node contains a lot of nodes, then sure it will take a long time to publish the nodeMahesh KP
I'd definitely echo what Simon Svensson said -- if you're trying to debug performance with tracing, you want to add trace statements around everything. Good luck!Owen Blacker

1 Answers

1
votes

There could be a number of issues but the change that had the best impact for me was setting macro caching.

If you're able to identify a macro that is common across all pages (e.g. top-level navigation), go to the Developer section, select that macro and set a value for the Cache Period (somewhere between 600 seconds or upwards).

Umbraco Macro Caching

What happens here is when the first request to your page is made, Umbraco will run the macro in full and generate the required output - in the most cases this will be some kind of HTML markup. Umbraco will then dump this output into the ASP.NET cache and leave it there. The next request that comes in within the given Cache Period (600 seconds in the above example) will use the content that exists in the cache rather than running the macro.

Another possible option might be to turn tracing on and see if anything surfaces there. Add the following querystring to the URL: ?umbDebugShowTrace=true and look for any errors or warnings.