开发者

Does loading too many function libraries decrease speed?

开发者 https://www.devze.com 2023-04-01 18:01 出处:网络
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 tim

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

精彩评论

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

关注公众号