1

I'm using the Stats.aspx (http://hostname/sitecore/admin/stats.aspx) admin page to identify the slowest components in my solution.

For some components, I see two entries e.g.

+--------------------------------------------------------------------------------------------------------------+----------------+------------+-----------+------------+------------------+-------------+
|                                                  Rendering                                                   | Avg. time (ms) | Avg. items | Max. time | Max. items |    Total time    | Total items |
+--------------------------------------------------------------------------------------------------------------+----------------+------------+-----------+------------+------------------+-------------+
| Gallery (/sitecore/layout/Renderings/Feature/MySolution/Media/Gallery)                                       |       306.3429 |        159 |  915.2689 |        469 | 00:00:00.9190289 |         479 |
| Controller: MySolution.Feature.Media.Controllers.GalleryController,MySolution.Feature.Media. Action: Gallery |       305.3223 |       9386 |  913.6628 |      28061 | 00:00:00.9159670 |       28158 |
+--------------------------------------------------------------------------------------------------------------+----------------+------------+-----------+------------+------------------+-------------+

The first is the path to the Rendering definition item, whereas the second is the assembly namespace/class of the controller for that same component. Why does the stats page represent the same thing twice and which one represents the true values?

6
  • Are you loading the rendering via a controller rendering? Sep 10, 2019 at 14:13
  • Hmm possibly. I've seen that on a few other renderings... Sep 10, 2019 at 14:47
  • And the other renderings are also from controller rendering? Sep 10, 2019 at 14:58
  • Yes, almost everything is done with controller renderings. Sep 10, 2019 at 15:01
  • So, I think this is why you are having 2 entries. I'll try to dig into this later and see why this is happening. What sitecore version are you using? Sep 10, 2019 at 15:02

1 Answer 1

1

Based on my investigation, the statistics of the rendering is added during the execution of the <mvc.renderRendering> pipeline. The method RecordStatistic is called at the end.

So, for every rendering being rendered on the page, Sitecore is adding the statistics so duplicate should not be present.

However, what may happened is that if you have 2 renderings: 1 controller rendering and 1 normal rendering, it may be that on some items you are using the rendering directly while on other items it may be the controller rendering.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.