You are here:  » OPcache with PT


OPcache with PT

Submitted by Retro135 on Tue, 2017-01-24 14:54 in

Are there directories and/or files that are recommended to be blacklisted when using OPcache?

Submitted by support on Tue, 2017-01-24 15:03

Hi,

I'm afraid I don't have any experience of OPcache as it is a very recent addition to the PHP stack so if you choose to implement, make sure that everything is working as expected throughout your site, I'm afraid without any experience I would not be able to comment on what should / should not be permitted but I will certainly investigate!

Cheers,
David.
--
PriceTapestry.com

Submitted by Retro135 on Tue, 2017-01-24 15:52

Thank you, David! Have been checking, pages are loading, although having long TTFB on many category hierarchy and some product pages, but not with merchant pages. That may be a separate issue, have to keep experimenting.

Found these explanations, but can't make head nor tails of them:
https://gist.github.com/krakjoe/962e54c38b155f896b00
http://jpauli.github.io/2015/03/05/opcache.html

Submitted by support on Wed, 2017-01-25 09:08

Hi,

As the category result pages (generated by search.php) and product pages do not have any form handling involved you could make a simple mod to send the content-type header immediately which would bring TTFB down, although wouldn't have any effect on overall page load time of course. To try this, create a new file html/header_http.php containing the following code:

<?php
  header
("Content-Type: text/html;charset=".$config_charset);
?>

Then edit html/header.php and look for the following code at line 4:

  header("Content-Type: text/html;charset=".$config_charset);

...and REPLACE with:

  require_once("html/header_http.php");

And then in any script that you want to expedite sending of the Content-Type header to reduce TTFB, look for the line to include common.php at the very top of the script and on the _next_ line, add:

  require_once("html/header_http.php");

Cheers,
David.
--
PriceTapestry.com

Submitted by Retro135 on Wed, 2017-01-25 18:44

Hi David,
Added that to header + other scripts, shaved off about .3-.5 off TTFB. Thank you, every bit helps!

The merchant page TTFBs are generally low, 50-150ms. I was seeing 2+ on product/cat pages (now about 1.6-1.8 with your mod).

What I'm wondering is why TTFB isn't an issue with merchant pages (or the featured items page, which has 18 products, loads in under a second) but seems to only affect product and category pages? Trying to figure out what I may have misconfigured.

Submitted by support on Thu, 2017-01-26 08:56

Hi,

Merchant result pages can be queried slightly faster than category / brand since there is by definition no grouping (comparison) in merchant results - that is probably the reason...

Cheers,
David.
--
PriceTapestry.com

Submitted by Retro135 on Thu, 2017-01-26 14:22

Does this mean the more categories I add, TTFB will be growing longer?

Submitted by support on Thu, 2017-01-26 15:43

Hi,

Not with the above expedite HTTP headers mod - TTFB should be unchanged regardless of how large your database / hierarchy grows, but even then you shouldn't be seeing significant total page load time simply through adding categories but if you are, let me know and I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com

Submitted by Retro135 on Thu, 2017-01-26 23:57

Thank you David, very good to know.