CodeIgniter Forums
Is ActiveRecord resource intensive? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Is ActiveRecord resource intensive? (/showthread.php?tid=28740)



Is ActiveRecord resource intensive? - El Forum - 03-19-2010

[eluser]iamdadude[/eluser]
I'm coding an application with server resources in mind, so I don't want to use too much so that this application scales in the future. I don't mind writing my own queries. So, is ActiveRecord resource intensive for my application? Or does it not make a difference?

Thanks!


Is ActiveRecord resource intensive? - El Forum - 03-19-2010

[eluser]bretticus[/eluser]
Active Record methods are mostly just setting properties, etc. It's the get() call where the "action" happens. Simply put, it's a database abstraction class. I really don't think it's too heavy. Of course, I've never profiled it against, say, PDO. I'd recommend that doing a simple test would suffice. I think I can guarantee that your bottle neck will be tcp transaction with the database. In my opinion, the benefits outweigh the milliseconds you may save by not using it.