CodeIgniter Forums
Buddy Bradley's ActiveRecord in Production site - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Buddy Bradley's ActiveRecord in Production site (/thread-5348.html)



Buddy Bradley's ActiveRecord in Production site - El Forum - 01-18-2008

[eluser]zeratool[/eluser]
Hello CI'ers,

I just want to ask here if somebody has used Bradley's activerecord class in a live/production.
How does it perform? Pls I need your feedback, I was thinking of using it on my coming project.


http://ellislab.com/forums/viewthread/61192/



Thanks a lot.


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]zeratool[/eluser]
anybody here?


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]Edemilson Lima[/eluser]
ActiveRecord can add a little more overhead in your application execution, but gives you the ability to change from one database engine to another without need to make changes in your code. But I don't know if ActiveRecord can manage complex queries with a lot of joins, groups, etc.

I don't know the class you told, but if the author guarantee that it is running fine, you can try it. Make your own tests and you will know if it match your requirements.


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]zeratool[/eluser]
Thanks for the reply, this is his class:

http://codeigniter.com/wiki/ActiveRecord_Class/


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]nmweb[/eluser]
Kohana has a similar but more extensive implementation of ORM based on this library. It is slower than the ActiveRecord implementation which is slower than raw queries, all as expected. Memory usage is quite a bit higher when selecting a lot of records because an object is instantiated for each record.

http://mediex.homeserver.com/dev/kohana/index.php/benchmark/database shows some benchmark results. It deals with I think over 700 records or so. As a whole I think ORM in this form is pretty fast and little can be done to make it faster.


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]zeratool[/eluser]
Thanks for the benchmark. So are you saying that i should rather use the native sql stuff for speed?


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-19-2008

[eluser]Michael Wales[/eluser]
Not necessarily Native SQL, but CI's native Active Record is a good solution. It's always much easier to manage your queries better without using an ORM library.


Buddy Bradley's ActiveRecord in Production site - El Forum - 01-26-2008

[eluser]zeratool[/eluser]
Thanks for all replies. In related to this, i found another post :

http://codeigniter.com/wiki/ActiveRecord_Class_Mod/

This is a modified version of AR by Brad. Maybe somebody has benchmarked it. Thanks again.