$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Influence of WordPress functions on site speed|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Influence of WordPress functions on site speed

matteradmin9PV0评论

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 badges
Add a comment  | 

2 Answers 2

Reset to default 4

Functions 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

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far