A big part of commit operation is updating peer DataContexts with the changes committed to the database. The conext synchronization operation has O(N) performance, where N is the number of peer DataContexts. In a web application N is often the number of concurrent sessions, which can be quite big. The throughout of high volume applications can be improved by turning off peer synchronization. One possible way to do that is via a custom DataContextFactory:
Of course doing this may result in some stale data in the peer DataContexts, so a decision whether to use this particular technique should be made based on the application specifics. Also a factory can have logic to selectively turn off synchronization for a subset of DataContexts based on some criteria.
|Don't use this for idle applications|
Note that this optimization does not affect percieved user commit time, as synchronization is done in a separate thread. It only affects the overall throughput. So it only makes sense if your application already utilizes close to a 100% of CPU.
Further improvements in this area are tracked via CAY-554 Jira issue.