After 1.8.1 upgrade query 100 times as chatty

Topics: Installing Orchard, Troubleshooting
Feb 18, 2015 at 3:46 PM
Edited Feb 18, 2015 at 9:41 PM
Anyone run into this before?

I'm upgrading an old 1.4 site to 1.8.1. In the 1.4 site I had a taxonomy of "categories" with each category containing some simple fields and 1-3 "products" from a content picker field. EDIT: I used a taxonomy field, not a content picker, this seems to be the problem, see below

I have a projection whose query pulls all 10 categories and displays them in summary view along with the summary view of the 3 selected products. Not to complex.

Prior to the upgrade (on 1.4) the page loaded without trouble, maybe 2-3 seconds. But now, post upgrade (on 1.8.1), the page is taking 30+ seconds. I ran sql profiler on the db for the 1.4 instance and I see it pull ~1000 rows. Doing the same thing on the 1.8.1 instance and I see 70K to 100K rows loading before I stopped the trace.

Code is functionally the same, just followed these instructions then ran the 1.8 Upgrade module. Anyone have a path to at least start from?
Feb 18, 2015 at 9:45 PM
Edited Feb 18, 2015 at 9:49 PM
I just discovered the problem. The issue is my two taxonomies referenced each other and in 1.8.1 this must cause a circular set of calls.

So items in the category taxonomy took featured products and items in the products taxonomy had a selected category.

Orchard must be active loading the child elements both directions, so the category loads some products, which pull the category, which pull the products, etc. Not sure how this changed from 1.4 to 1.8, but certainly something to look out for.

Anyone know if there's a bug listing for this?

EDIT: also, how is this same problem solved with the content picker field?