admin管理员组文章数量:1130349
We know, that wordpress has custom functions that create in wp-includes and etc... and its system has more includes and functions(without calling)... My question is: Is abound of wordpress functions and includes, reducing site speed or no?
We know, that wordpress has custom functions that create in wp-includes and etc... and its system has more includes and functions(without calling)... My question is: Is abound of wordpress functions and includes, reducing site speed or no?
Share Improve this question asked Jan 4, 2019 at 12:49 Amir RafieeAmir Rafiee 312 bronze badges2 Answers
Reset to default 4Functions and includes (itself) don't affect the site performance much. But...
The code inside a function can affect site speed. It all depends what exactly that function does.
For example function esc_attr won't affect site speed, because its code is simple and will run fast.
On the other hand, functions like get_posts can take a lot of time to execute, because it has to parse your arguments, query the DB, obtain results and create objects for every row. So if you query for a lot of posts, it can consume a lot of time.
Another example of time-consuming function will be wp_remote_get. It retrieve the raw response from the HTTP request using the GET method. So you'll have to wait for the requested server to generate answer and so on.
Also, some functions run filters/actions inside. So themes/plugins may affect speed of their execution.
It depends on the use of functions usually the functions which are called in the frontend may effect site speed but the functions effecting in backend will not. However in most of the case the functions which are used to call another 3rd party URL may effect performace of the website
We know, that wordpress has custom functions that create in wp-includes and etc... and its system has more includes and functions(without calling)... My question is: Is abound of wordpress functions and includes, reducing site speed or no?
We know, that wordpress has custom functions that create in wp-includes and etc... and its system has more includes and functions(without calling)... My question is: Is abound of wordpress functions and includes, reducing site speed or no?
Share Improve this question asked Jan 4, 2019 at 12:49 Amir RafieeAmir Rafiee 312 bronze badges2 Answers
Reset to default 4Functions and includes (itself) don't affect the site performance much. But...
The code inside a function can affect site speed. It all depends what exactly that function does.
For example function esc_attr won't affect site speed, because its code is simple and will run fast.
On the other hand, functions like get_posts can take a lot of time to execute, because it has to parse your arguments, query the DB, obtain results and create objects for every row. So if you query for a lot of posts, it can consume a lot of time.
Another example of time-consuming function will be wp_remote_get. It retrieve the raw response from the HTTP request using the GET method. So you'll have to wait for the requested server to generate answer and so on.
Also, some functions run filters/actions inside. So themes/plugins may affect speed of their execution.
It depends on the use of functions usually the functions which are called in the frontend may effect site speed but the functions effecting in backend will not. However in most of the case the functions which are used to call another 3rd party URL may effect performace of the website
本文标签: Influence of WordPress functions on site speed
版权声明:本文标题:Influence of WordPress functions on site speed 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749045060a2307731.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论