开发者

Does loading too many function libraries decrease speed?

I have a series of function libraries that I have 开发者_StackOverflow中文版set to autoload in the CodeIgniter framework. Would auto-loading (i.e. including) many libraries increase the processing time of each page, and would such delay be significant?

I know it can be dependant upon many other factors, but in general, is there such a thing as loading too many libraries?


Yes,

depending on the order in which the autoloaders have been registered, a classname might be passed trough multiple autoloaders, which might use a file_exists, strpos or preg_match to see if the classname matches their library.

Having to load 100+ classes a request, this can become a costly thing.


To be short. Yes, it will have an impact on page load.

Yes, there is a "too-much-libraries". Depending on server configuration. (Max execution memory, if I remember right)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜