Welcome Guest, Not a member yet? Register   Sign In
file_exists() on non existstant files (file descriptors)
#2

Do you have a bunch of entries in /application/config/autoload.php you don't need? Any entry in the autoload config is loaded every time CI starts.

Do you check whether a class/function exists before attempting to load it? In most cases the loader doesn't attempt to locate the file if the class has already been loaded, but there may be some exceptions.

Have you defined extra paths in the loader's view/library/model/helper paths (or used add_package_path() to do so)?

Other than that, the only thing I could really think of would be to overload the loader to limit the checks based on your requirements. I'd imagine if you really wanted to you could create a lookup table in one form or another by scanning the relevant directories through an external process and use that instead of calling file_exists(). As long as you run the task whenever files are added/removed, it shouldn't be much of an issue.
Reply


Messages In This Thread
RE: file_exists() on non existstant files (file descriptors) - by mwhitney - 11-12-2015, 03:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB