Welcome Guest, Not a member yet? Register   Sign In
"ORMs" compared. Gas ORM with best performance?
#1

[eluser]Henri85[/eluser]
Hi,

I compared (execution time, response time, memory usage and server load. Each based on 36 measurements: Test with 1, 10, 20 concurrent users, with MySQL and MySQLi driver) Doctrine ORM, Wanwizard Datamapper ORM, Gas ORM, Eloquent and Active Record (with caching off) in CodeIgniter 2.1.

Result? Gas ORM has the best performance. But why? What's special with Gas ORM that it has a better performance than Active Record?
#2

[eluser]CroNiX[/eluser]
And how do they all compare to straight sql?
#3

[eluser]Henri85[/eluser]
Hi,

Thanks.

I've for each "orm" a CI implementation with the models and a testsuite with the test in the specific query language. (+ foreach loops etc.). Very simple. Wink
#4

[eluser]CroNiX[/eluser]
Yes, but how did they compare to just plain old mysqli queries, with no orm/query builder. Basically run the query that the orms/query builder generate.

Like compare execution of
Code:
$this->db->select(blah)->join(blah, blah)->where(blah)->order_by(blah)->get(blah)->result();

to
Code:
$mysqli = new mysqli(host, user, password, database);
$result = $mysqli->query("SELECT blah FROM blah JOIN blah ON blah (condition=condition) WHERE blah=blah ORDER BY blah");
#5

[eluser]Henri85[/eluser]
No. I only compare the testsuites per orm in their own query language to each other (like your first example). Understand? Smile
#6

[eluser]CroNiX[/eluser]
Yes, I just think it would be interesting to compare them all, along with raw queries, for a good comparison. I've never seen a good comparison done. Could you also publish your findings/benchmarks for what you did test so we can see them side by side? Along with the queries performed? I think that would be very useful for people.
#7

[eluser]ivantcholakov[/eluser]
@Henri85

Without publishing you methodology and your code for benchmarking, your claims worth nothing.
#8

[eluser]ivantcholakov[/eluser]
@Henri85

A had a look at the source code (it has not been updated for two years). Gas ORM is built on top of CodeIgniter's database classes, so there is no way it to be faster than the former Active Record. Correct me if I am wrong, I did not spend much time on it.
#9

[eluser]InsiteFX[/eluser]
Pure MySQLi queries will beat all of them when it comes down to it.

There all built on top of MySQLi which means there adding over head from the start.




Theme © iAndrew 2016 - Forum software by © MyBB