This project is read-only.

Change in taxonomies in v1.8?

Topics: Core, Installing Orchard, Troubleshooting
May 20, 2015 at 6:17 PM
I recently updated a site from 1.4 to 1.8 and have seen a huge performance drop off (3 sec load => 15 sec load) on one of my pages.

I'm wondering if something changed in how taxonomies are handled between the two versions. My page consists of a taxonomy of categories that has a content picker field for featured products. Each product is a custom taxonomy term that has a taxonomy field showing which category it belongs to.

Watching sql profiler it appears that when I load a page displaying the categories they then load the products (as expected), which then loads the category and every product under that category. This amounts to many thousands of rows and is presumably my slowdown.

So, did something change in how taxonomy fields choose to load child objects?
May 20, 2015 at 6:23 PM
Performance is supposed to be better. Are you using 1.8.2 ?

Could you share some traces with us? Are you sure this is coming from the default module and not some custom code?
Would you have a repro with a default setup where you create a custom hierarchy and would let us pinpoint the code path ?
May 20, 2015 at 8:33 PM
We're on 1.8.1 now.

Positive that this is the default module, no custom modules here.

I'll work on a stack trace, the problem only occurs on a each user's first load of the page, subsequent loads hit the cache for that user.
May 20, 2015 at 8:36 PM
First thing I would personally do is to upgrade to 1.8.2, it's pretty easy.
May 20, 2015 at 9:11 PM
Ran mini-profiler and came up with a confusing (partial) culprit, the logon action takes 4.7 seconds. Nothing is particularly fast, but that surprised me. Not sure why it's firing at all on this page since the user is already logged on.

As to the db rows I mentioned earlier, I was mistaken. A normal-ish number is being requested, the many thousands was from a prior test where there appeared to be a circular reference when two taxonomies each refer to the other.

Details on the logon action issue:
May 22, 2015 at 7:37 AM
Maybe reason sth that is not related with taxonomies. Do you use Orchard image filters for rescale images you show on this page?
May 22, 2015 at 4:01 PM
Edited May 22, 2015 at 4:02 PM
Not right now, currently relying on users entering roughly correct images and then scaling with css.

Current image display code:
            @if(Model.ContentItem.PMCCustomProducts.ProductImage != null){
            foreach(var i in Model.ContentItem.PMCCustomProducts.ProductImage.MediaParts)  {
                    <a href="/@Model.ContentItem.AutoroutePart.DisplayAlias">
                    <img src="@i.MediaUrl" alt="@Model.ContentItem.TitlePart.Title" class="thumbnail"/>

May 27, 2015 at 7:52 PM
Any other thoughts on what might be causing this? Still stuck on it.