Re: [Modeling-users] Modeling/core v0.9pre11 released
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-07-28 14:44:45
|
While the bench script is not completely finished for now, I can give some performance indications for this release. For the benchs implemented by now, we have: > ./compare_bench.py perf.0.9pre10 perf.0.9pre11=20 {'bench_addObj_toMany': ('428.705 usec', '196.659 usec', '2.18'), 'bench_addObj_toOne': ('950.431 usec', '449.753 usec', '2.11'), 'bench_fetch_persons': ('6.056 s', '5.384 s', '1.12'), 'bench_fetch_raw_row': ('10.672 ms', '11.005 ms', '0.97'), 'bench_fetch_raw_rows': ('550.871 ms', '526.122 ms', '1.05'), 'bench_fetch_raw_rows_all_modified': ('1.803 s', '1.432 s', '1.26')} (reported time is for python2.2, no optimization, with model caching enabled for 0.9pre11 --new in this release) The performance gains are quite similar w/ python -O: > ./compare_bench.py perf.0.9pre10.opt perf.0.9pre11.opt=20 {'bench_addObj_toMany': ('424.029 usec', '190.539 usec', '2.23'), 'bench_addObj_toOne': ('951.976 usec', '424.874 usec', '2.24'), 'bench_fetch_persons': ('5.627 s', '5.030 s', '1.12'), 'bench_fetch_raw_row': ('10.570 ms', '10.579 ms', '1.00'), 'bench_fetch_raw_rows': ('555.589 ms', '521.151 ms', '1.07'), 'bench_fetch_raw_rows_all_modified': ('1.800 s', '1.452 s', '1.24')} Signification: The above lines share the same format: 'bench_name': (time1, time2, gain=3Dtime1/time2),=20 where times are as observed on my machine, and benchs' names are: - bench_addObj_toMany: addObjectToBothSidesOfRelationshipWithKey() on a to-many relationship =20=20=20=20 - bench_addObj_toOne: addObjectToBothSidesOfRelationshipWithKey() on a to-one relationship =20=20=20=20 - bench_fetch_persons: fetch 5000 simple objects (1 string attribute, 1 PK, 1 FK hence 1 to-one fault created for each object) =20=20=20=20 - bench_fetch_raw_row: fetch one single row =20=20=20=20 - bench_fetch_raw_rows: fetch 5000 raw rows (same simple objects/ rows than above) =20=20=20=20 - bench_fetch_raw_rows_all_modified: fetch the same 5000 raw rows, where the corresponding objects were already fetched in the EC and are all modified (this is the worst situation for fetching raw rows) Rq.: Fetching seems to be equally fast. In fact, it was slowed down a little by the extra work needed to support to-many relationships w/o inverse. This loss of performance is then regained by caching models at runtime. The performance boost observed for addObjectToBothSides... is mostly due to model's properties caching --plus some "refactoring effect", but only for a small part of the perf gain. I'd like to thank Yannick in particular here, for his numerous feedbacks and suggestions about the observed performance bottlenecks in the framework. -- S=E9bastien. |