@johannes: as mentioned yesterday you have to move EntityTransaction#begin and EntityTransaction#commit into the for-loop.
regards, gerhard 2017-06-01 12:58 GMT+02:00 Thomas Andraschko <[email protected]>: > Hi, > > ~1 year ago i did many optimizations in the data module and AFAIR DS Data > was only a little bit slower. > After i compared my testcase with a benchmark from a user, the big > different came from the transaction handling which was different in both > testcases. > > Regards, > Thomas > > 2017-06-01 12:33 GMT+02:00 Gerhard Petracek <[email protected]>: > > > hi johannes, > > > > after refactoring your initial code to ds-test-control i saw e.g. ~6s vs > > 7,5s for 2560 iterations. > > i'll compare my local version with your new version (mentioned in your > > mail). > > > > regards, > > gerhard > > > > > > > > 2017-06-01 11:35 GMT+02:00 Schäfer, Johannes <[email protected]>: > > > > > Hi, > > > > > > My company is thinking about using DeltaSpike Data. But before we > > > integrate this into our development I was asked to prepare some > > benchmarks, > > > comparing the usage of DeltaSpike Data with the usage of a plain > > > EntityManager. > > > I prepared some benchmarks and I was surprised that there is a big > > > difference in the write performance. I already got some hints in the > > delta > > > spike irc channel, but the performance is still bad. > > > Based on a template from os890 I implemented my tests and prepared a > > > github project. > > > https://github.com/johannesschaefer/javaee_jsf_ > cdi_jpa_data_ds_project_ > > > template > > > Basically I'm talking about this test: > > > https://github.com/johannesschaefer/javaee_jsf_ > cdi_jpa_data_ds_project_ > > > template/blob/master/src/test/java/de/psi/metals/futurelab/ > > > repo/benchmark/SaveTest.java > > > > > > It just saves an entity into a DB in a loop. Depending of the number of > > > iterations the difference is quite big. > > > > > > SaveTest > > > ____________________________________________________________ > > > ____________________________________________________________ > > > _____________________________ > > > | | iter 10 | iter 20 | iter 40 | iter 80 | iter 160 | > > > iter 320 | iter 640 | iter 1280 | iter 2560 | iter 5120 | iter > > > 10240 | > > > |=========================================================== > > > ============================================================ > > > =============================| > > > | DS| 0.004911746| 0.03597043 | 0.015765787| 0.016966639| 0.043319612| > > > 0.281807839| 1.308948835| 1.370535533| 8.186996818| 20.920141274| > > > 93.631768475| > > > | EM| 0.004557839| 0.003256631| 0.005775416| 0.004834958| 0.028243393| > > > 0.035484616| 0.038600595| 0.088904458| 0.339158674| 0.745850523 | > > > 0.853543234 | > > > > > > Also the difference between a run with 5120 and 10240 iteration is not > > > just the double amount of time, it is more than 4 times more. > > > > > > Do you have some hints to me what I'm doing wrong there? > > > > > > Regards > > > Johannes > > > > > > > > > > > >
