My WordPress site has quite a few long posts that slow down page loading time exponentially.
This only happens when using the post_content, for example, when using the
I ran some tests with the Query Monitor plugin. Load time is in addition to the page's base loading time without
Post 1 (Extremely long)
Load time: +9 seconds
Post 2 (Long)
Load time: +2 seconds
Post 3 (Average Length)
Load time: +0.25 seconds
It seems that the loading time dramatically increases, exponentially so, as the post_content size gets larger.
Is this normal behaviour for WordPress? Is there something I can do to make large posts load faster?
Note that this problem seems to be unrelated to any database queries. The database query time on any of these pages is between 0.03 and 0.06 seconds.
I discovered that the issue originates from the
wpautop filter function. Removing this function from the
the_content filter makes my pages load fast again, but removes any and all formatting from the posts...