Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Url prefix slows site down, new info

Status Resolved
Add-on / Version Publisher 1.6.5
Severity
EE Version 2.8.1

A2 Hosting

Sep 29, 2015

We didn’t get notifications about updates on ticket 1128 (even the replies to us) so I wanted to open a new ticket with new information.

I ran our site through XDebug Profiler and found that publisher/models/publisher_site_pages.php calls json_decode on line 860 over 5000 times and seems to be the cause of the slowdown. When I comment out lines 842 through 862 the page loads much faster.

We are using structure and have over 600 channel entries in the channel that this page is coming from.

#1

BoldMinded (Brian)

Thanks for the report. This looks like a side effect of a quick fix for a bug awhile back. Go to line 842 of that file and change it to this:

if ( !isset($this->cache['site_pages']))

That should cache that request so it doesn’t call decode excessively. Please test the language switching though on various page types to make sure the old bug doesn’t come up again.

#2

A2 Hosting

Problem solved, both English and Spanish have nearly identical load times now.

I will keep an eye out for any problems, can you let me know what the old bug was so I know what to watch out for?

#3

BoldMinded (Brian)

I can’t remember exactly, but if you look a few lines up in the code I added a comment on why I disabled the caching. It looks like it just got confused and couldn’t find the translated version of a url when attempting to switch languages b/c the cache always had the same data in it. So if you’re using translated URLs and its switching fine for you, then this might be the right fix.

Login to reply