Juggernout/autolinker perfomance issue with get_the_excerpt
-
hi,
we run into toubles with juggernout/autolinker when generation pages with a lot of excerpts, e.g. news overviews etc. If the there is no excerpt in the DB, WP will try to generate one via get_the_content, and running all filters on it, including juggernout. This will slow the page down it it has a lot of post, resulting in a timeout ??Best would be to not run the juggernout content filter if called when generation an excerpt (As links will be stripped off the excerpt anyway).
Here is the patch I suggest for fixing this, would be nive if this could get included in the next update:
Index: content-autolinks.php
===================================================================
— content-autolinks.php (revision 17536)
+++ content-autolinks.php (revision 27235)
@@ -57,6 +57,12 @@function autolink_content($content) {
+ // TODO cgaffga: no auto-linker when generating excerpt
+ $stacktrace = debug_backtrace();
+ foreach ($stacktrace as $step) {
+ if($step->function == ‘wp_trim_excerpt’) return;
+ }
+
$links = $this->get_setting(‘links’, array());
if (!count($links)) return $content;…maybe a setting to activate it would be nice, but I think it’s good to have it always on.
hope this is of help.
kindly,
Christoph
- The topic ‘Juggernout/autolinker perfomance issue with get_the_excerpt’ is closed to new replies.