Welcome Guest, Not a member yet? Register   Sign In
autoload performance
#3

[eluser]eilrahc[/eluser]
There will be a difference, but the exact different depends on your code, how much you are auto-loading, and what kind of load (in terms of page hits) your users will be generating.

I have three places where I load things:

1. The autoload feature of CI. Only put things in here that must be loaded on every single page view, period. I currently only have 'database' specified here.

2. The class constructor. Here's where you want to put load statements for code that will be used for all methods in the class, but which might not be needed for all classes.

3. The top of a method. If I'm loading a library or helper for use in one or two methods, it doesn't make sense to load it for every method in the class, so it goes here where it can be loaded on demand.


Messages In This Thread
autoload performance - by El Forum - 08-16-2008, 12:02 PM
autoload performance - by El Forum - 08-17-2008, 08:07 AM
autoload performance - by El Forum - 08-18-2008, 03:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB