Interesting question - this is one part that is too scary to anyone to change. First rule - you don't talk about runAllManagedModulesForAllRequests. Second rule, you don't talk about runAllManagedModulesForAllRequests.
I can't provide official statement, because we haven't tested it. But if you can provide profiling result, it can make a better argument for me to spend time looking into it.
When are we getting reactions in the forum? Pretty sure we need reactions in the forum. :joy:
Joel, I can add an emoticon. That's the same as a reaction, right? Do you see the smiley face toolbar button?
Sort of, but not entirely! What I mean with reactions is basically an emoticon attached to a post. Would be cool to "react" to a post without adding a new post, just as Slack, Facebook, Skype, etc does. So you don't bloat the topic, which we are doing right now
Hi Quan and Erik,
I noticed the same with BusinessFoundationInitializeModule as you describe Erik. See the profiling results (image below) of multiple image request. Refreshed a couple of times and then suddently it does a DB call to "cls_contact" in BusinessFoundationInitializeModule.
As I said, the configuration can has unforseen consequences. As we haven't tested it, we cannot recommend to turn it off.
Performance is important but not at the cost of correctness.
Quan I understand but my comment was for this :)
I can't provide official statement, because we haven't tested it. But if you can provide profiling result, it can make a better argument for me to spend time looking into it.
OK :)
By profiling result, I meant that the result that says running with runAllManagedModulesForAllRequests = false yield significant performance improvements over running with true (So I can argue with my team that this is something we should look into). Thanks for the profiling result, but in this case I'm a bit afraid that was not clear/enough :)
Is there any gotchas to set "runAllManagedModulesForAllRequests" to false in web.config?
The modules I see that have a preCondition is:
Would it be safe if those aren't run for all request?
Background:
We are running commerce 11.2.0 and have noticed database calls when loading product images.
Specifically this have been traced back to BusinessFoundationInitializeModule that loads a CustomerContact to populate DataContext.Current.CurrentUserId in context_AuthorizeRequest.
The result is being cached but during periods of high traffic on the server we seem to be getting more db calls so we suspect that the cache might get evicted at high load.
As a sidenote it is interesting to see it load an entire contact with organization plus addresses and then only use the Id (Although it populatez the cache so it -might- not be wasted). ^^
Kind Regards
Erik Norberg