Kind of suspected it is going to fire when number of Includes in my EF statement will grow above some threshold. But this bad?!
And this is not the final snapshot, at the end that ApplyRulesToSubtree in the Compile of CreateDbCommandDefinition goes to something like 250 seconds and then I have transaction scope timeout firing up (and have no intent to have transaction timeout higher than 60s here!:)).
Some reading points to splitting the query “includes” like here.
In my case I went with splitting the former query:
So actually, that just populates the context with data from many short queries.
The result? From infinite number of minutes to few seconds!
Why I didn’t use lazy load here? I could not afford having proxies for serialization purposes… As well it was good after all to have those reads in one place as I had to suppress transaction just in one place then.