Forum Moderators: coopster
I have my functions organised into two libraries - one for admin functions, and one for functions used in teh public side of the site - the latter is about 1000 lines. I normally use require to get it into the neccesary page.
Following the general advice for improving performance, which someone gave in a recent post, I have isolated that a very substantial proportion of the processing time for many of my pages is the require for the library file. Reduceing the size of that file makes a big differance in processing time.
Alot of functions in it are not needed on many of my pages, but those functions which are needed on those pages, are also needed by other functions used on other pages.
What is the best practice in this situation?
One idea I have had is that - especially where there is only one or two functions needed by a page ot would be alot quicker to simply put those functions on the page, and set up a system for me to keep a note of what functions are duplicated onto what pages. This would both minimise the file sizes, are reduce IO operation, reading the library.