Hi

Don't know if I should JIRA this or send it to this list, hopefully I made the 
correct decision.

I've recently upgraded from NH 2.0 -> 2.1/trunk. Works like a charm! One thing 
that struck me though, is the perf cost for (larger) queries.

The main cost compared to NH 2.0 boils down to many calls to 
System.Transactions.Transaction.Current.

I think it would be good if...

* Decrease number of calls to EnlistInAmbientTransactionIfNeeded. It's now 
called every time CheckAndUpdateSessionStatus is called which happens... often. 
In humble words I really don't say it's not needed but as naïve I am, it feels 
like it's only needed once per db hit? Can this check maybe happen "closer to 
the db" (batcher?)
* If the number of calls to this method cannot be/without pain be optimized, 
have a configuration flag turning this check off (use_external_transactions = 
"false" or similar) for apps where only nh transactions are needed?

Thanks for your work & effort
Roger

Reply via email to