If I split up my functions into separate files (one file per function) and just include those files for the functions I need for a particular page, will the multiple includes cause more overhead than if I were to organize functions into large files and just include a few large files per page?

Just wondering what's better.

    I would say just include most of them in all one file. If you just for the fact that I opening a file can be expensive I think... Parseing the file isnt as bad.
    But I dont think there is too much of a noticalble deference... unless you includeing an ungodly ammount of files. But if you are really worried about being really really fast and really effecient, you would probably be writing this stuff in C or something.

      • [deleted]

      Use one big file, or group the function by subject. One function per file is definately un-usable.

      Including more files is probably slower than parsing a little extra code.

        Why dont u use classes for the multiple classes. I think you must group all the related functions in class and make use objects to refer to the methods. I think that is the best way. Any way even if you want it your way then try it putting related group the functions use mostly together in same files and then include them.

        Nikunj Virani

          Write a Reply...