performance concerns

3 views
Skip to first unread message

Jonathan Ariel

unread,
Oct 7, 2009, 12:16:35 PM10/7/09
to outle...@googlegroups.com
Hi group!
So I cloned the git repository to add my changes (inheritance support) and I ran into a file called PERFORMANCE.
Something that really scared me is that selecting in outlet is REALLY slow comparing to PDO.
Is there any work in progress to lower this?

Jonathan

Alvaro Carrasco

unread,
Oct 7, 2009, 12:31:57 PM10/7/09
to outle...@googlegroups.com
I wonder how fabio came up with those stats. Fabio?

I've been using outlet for a long while and, when i profile my code,
the overhead of outlet is usually negligible compared to the query
time. The only time when i have found this is not the case is when you
run into the n+1 select issue, which is inherent in all ORMs and can
be avoided by eager fetching, and careful joining when necessary.

I haven't done any benchmarks myself, though. I've only profiled my
own code when it runs slow, and i haven't found Outlet to be the
culprit of performance issues.

Alvaro

Alvaro Carrasco

unread,
Oct 7, 2009, 12:48:23 PM10/7/09
to outle...@googlegroups.com
I just noticed the benchmark was using in-memory sqlite. I imagine
in-memory db operations are extremely fast if there are not very many
rows or joins, and in those situations, when testing many repetitions
outlet (or any orm) would seem very slow in comparison. I would be
nice to see a benchmark with a database like mysql or sql server, on a
separate machine connected through local network, which would be a
much more common setup for a project that would use an ORM.

Alvaro

Jonathan Ariel

unread,
Oct 7, 2009, 1:15:40 PM10/7/09
to outle...@googlegroups.com
I don't know who made the benhmark, but if you guys explain to me how
you did it and what you wanted to measure I can update them using a
real mysql and local network.

Fabio R.

unread,
Oct 7, 2009, 4:58:51 PM10/7/09
to outle...@googlegroups.com
Hi guys,

Let me apologize for not making things clear on repository. First of all, the performance numbers on Github (http://github.com/fgrehm/outlet-orm/blob/master/PERFORMANCE) relates to the new version being developed (not 0.7 nor SVN/trunk version), so don't take it too serious right now :-)
These are the tests:
   http://github.com/fgrehm/outlet-orm/tree/master/performance_tests/

Well... This is just some experimentation, I've never done these tests before and I don't know how good they are. I just wanted to know how much time we spend mapping the query result to objects (and also to start this discussions :-). I haven't done any tests with other versions or libraries to compare the numbers.

One thing to note is that PDO numbers represents running SQL queries (http://github.com/fgrehm/outlet-orm/blob/master/performance_tests/performance.php#L73) while in Outlet tests we also have the query processing and object mapping that the the library does.

Another thing that might not be clear is that *selectRecords x 10* doesn't mean we are selecting 10 objects, we are actually *selecting 1000 objects x 10", the 1000 objects comes from bulkInsertRecords test which runs before selectRecords test (I know, this is kind of a hack but does the job for now :-).


I hope this helps :-)
Regards,
--
Fábio Rehm
Reply all
Reply to author
Forward
0 new messages