CodeIgniter - Autoload

I was wondering what the best practices for CodeIgniter's autoload are. Is it bad practice to just autoload everything I might ever need, or is it okay to do so? Does this put more load on the application?

At the moment I'm just autoloading the libraries and helpers I'll be using throughout my application:

$autoload['libraries'] = array('database', 'session', 'parser'); $autoload['helper'] = array('url', 'form');

So I'm basically wondering if this is 'okay' to do or if I should just load some of them when I'm actually going to use them (like the form helper: only load it when I'm actually going to build a form on a page).

Perhaps I'm being a bit too paranoid here, but having read about the 'Ruby way' a lot, I was wondering if there is, maybe, a CodeIgniter way. Thanks in advance!


$autoload loads a resource weather you use it or not period

So that in mind I would only autoload what you need all the time, but if I were to input my 2 cents I always use my __construct for this in the top of each controller class file. That way it loads for all pages (functions) in that class and it isn't autoloading even if i don't need it in that class file.


You should avoid autoload, because it has an impact on your performance. However think like database connection could be autoloaded if you use it frequently.

Php isn't Java, so loaded application don't persist between requests.


  • Make sure c++ decimal comparison is correct
  • Mixing Win32 SEH with heap-allocated stack frames
  • Session State v ViewState
  • returning a memoryStream as a string
  • Example for subscribing for BLE indicate in android
  • Cakephp Form Helper
  • Are there algorithms for putting a digest into the file being digested?
  • Play Framework nested form errors missing
  • How do I capture a rsolr Sunspot exception raised on a different thread from a model callback?
  • Ruby and class variables in inherit class
  • SSL client cert authentication for only some URLs?
  • Is it possible to run clang with llc flags
  • VSCode change debug shell to bash on windows
  • SQLite connection strategies
  • Adding elements to a huge XML file
  • How integrated is Collada to OpenGL ES
  • How can I extract results of aggregate queries in slick?
  • Jackson Parser: ignore deserializing for type mismatch
  • Is it possible to access block's scope in method?
  • How to delay loading a property with linq to sql external mapping?
  • Debugging ASP.NET on a built-in web server suddenly stops
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • How to extract text from Word files using C#?
  • Javascript Callbacks with Object constructor
  • Sending data from AppleScript to FileMaker records
  • jQuery tmpl and DataLink beta
  • Return words with double consecutive letters
  • Circular dependency while pushing http interceptor
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • SQL merge duplicate rows and join values that are different
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • Change div Background jquery
  • LevelDB C iterator