summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-10 03:20:46 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-10 03:20:46 +0100
commitd5e0cb5fe94fb7a89cc12842511481a3c3d37d8e (patch)
treed251b2f3d6f7a31b3c39a204f2fa7bc25292ff80 /system/core/Loader.php
parent8fae08c0343550702e75f318b818c4b454c7aca3 (diff)
sped up Driver loading slightly by predicting subfolder location
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index c399f296d..1726f0a53 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -558,7 +558,14 @@ class CI_Loader {
if ( ! class_exists('CI_Driver_Library'))
{
// we aren't instantiating an object here, that'll be done by the Library itself
- require_once BASEPATH.'libraries/Driver'.EXT;
+ require BASEPATH.'libraries/Driver'.EXT;
+ }
+
+ // We can save the loader some time since Drivers will *always* be in a subfolder,
+ // and typically identically named to the library
+ if ( ! strpos($library, '/'))
+ {
+ $library = $library.'/'.$library;
}
return $this->library($library, $params, $object_name);