Re: Need to ship SimpleOrm, Benchmarks
Franck Routier <[email protected]> Tue, 18 Aug 2009 22:03:05 +0200
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Organization | Axège Sarl |
| Message-ID | <1250625785.4170.29.camel@franck-laptop> |
Hello Anthony, I didn't have much time the last days, but I did some tests derived from examples/benchmarks Doing the test I also noticed there is a bug in SDataSet.findOrCreate() : if the record is not found and is created, it is not marked as new row and will fail when flushing with an OptimisticLockException (as all optimistic values are null). There is a comment saying: // We leave it not new and not dirty. That is set by the SSession. but it is definitely not the case if the record is created while the dataset is not attached... I didn't fix anything yet, I'm not sure what to do... Regarding the results of the tests, on my machine, cloning a 10000 records dataset takes consistently about 1 sec, just for cloning. ------ simpleormSavepointInsert 288 (291) (microsecond/row) ------ simpleormCloneInsert 402 (291) (microsecond/row) (cloning time 1032 ms) ------ simpleormInsert 258 (291) (microsecond/row) So the overhead for cloning is important... (and in the example, all records are dirty, so savepoint is not advantaged). But on the other hand savepoint is not mature enougth to ship. For example I realized that Arrays.copyOf does a flat copy of the array. So savepoint works for fields based on immutable objects (Strings, raw types, ...) but not for SFieldBigDecimal for example. So I would have to make a deeper copy of the arrays in SRecordInstance, which will take more time... What I propose is to remove savepoint for now. I'll keep a patch on a local copy the test and improve. If one day I think it could work, I'll propose it again, but probably as an external plugin, relying on hooks in simpelorm core, as it was done for SConnectionEJB. Does it seem ok for you ? Regards, Franck Le mardi 18 août 2009 à 14:21 +1000, [email protected] a écrit : > > Hello Frank, > > I have updated the white paper, added Transient Query section. Will > add a bit more soon. > > I have done some rough benchmarks on the serializing clone. Wildly > varying results, but about 30ms for a data set with 1000 records, 10ms > if about 10 records. So not terrible, but not great. > > Made minor changes to genericizations. Be sure to update. > > I really want to ship another version while I have a little time. I > would like to benchmark clone() on your actual application. And then > remove save points, and/or implement clone efficiently. Cannot ship > with save points unless we intend to keep them permanently. > > I want to do some JSP tests with the maps. > > Regards, > > Anthony > > Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874 > Just because it is possible to push twigs along the ground with ones > nose > does not necessarily mean that is the best way to collect firewood. > > > > > ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/SimpleORM/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/SimpleORM/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/