CodeIgniter Forums

Full Version: Buddy Bradley's ActiveRecord in Production site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[eluser]zeratool[/eluser]
anybody here?

El Forum

[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.

El Forum

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

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

El Forum

[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/...k/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.

El Forum

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

El Forum

[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.

El Forum

[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.