High plugin loadtime
-
I’m really, really happy with this plugin. It does exactly what I need! But unfortunately, it has big impact on the loading time of my pages as measured with P3 Plugin Performance Profiler. It seems it is always loaded, even when it not necessary and it is very big. It is 30% (0.2189s). All other plugins, apart from Woocommerce itself, are just a fraction. This is really an extreme outlier in terms of performance impact.
I can provide more details if necessary.
Is there any way the impact can be reduced?
The page I need help with: [log in to see the link]
-
Hi! I’m sorry to hear that. We are not aware of performance issues and don’t have this result on our own test environment.
On which pages are you getting this high load? The plugin is actually very low profile, over all – only when you actually create a PDF it uses more resources, but that is to be suspected.
On the backend it only adds a few icons & buttons, displays some invoice numbers but that’s all. On the frontend it doesn’t do anything except for the My Account page.If you let me know which pages are giving you this high load I will investigate for you. Which PHP versions do you use?
Do note that the P3 profiler plugin is quite outdated and may give skewed results on modern systems.
Let me know!
EwoutHi Ewout,
First of all, thanks a bunch for your very quick reply!
I’m not sure how P3 profiler exactly works and with respect what pages it does its measurements. It doesn’t report anything about what page it has scanned.
I am under the impression it measures all the time and then presents the averages. You can see the outcomes here:
https://www.silverbackprotein.nl/tmp/p3screenshot.PNGand:
https://www.silverbackprotein.nl/tmp/p3screenshot2.PNGMany thanks again for all your help.
Regards
I see. You can see more information in the ‘Detailed timeline’ tab. If you hover the points in the graph you can see what page that was. If you run P3 on automatic it just goes over a few pages, I recommend doing it manually and checking pages that you are experiencing as being slow. I still think your site is actually quite fast: 770ms is not bad at all. It’s al relative. If you’re running so few plugins then naturally anything will add something.
Hi Ewout,
First of all thanks again for your quick reply. I really can’t find a way to do in manually nor do I see a possibility to see impact per page. Also the detailed timeline tab when hovering doesn’t reveal anything about the specific page.
It’s my homepage that is slow: https://www.silverbackprotein.nl (then again it is quite big as it is a one-pager). The rest of the pages is quite quick. It could very well be that because P3 works with averages, your plugin looks artificially high while it doesn’t impact the page (homepage) that I perceive as too slow.
In that case I may have bothered you for nothing. To be certain: You don’t find this pattern (about 30%, 0.22 seconds) with other sites that run your plugin?
Regards,
JurgenNever mind, I think I have found the differentiation per page after all. There is no outlier, but you can see it is substantially higher than the bulk of the plugins. But the respective pages are mainly backend pages (wp-admin) but also wp-json. But my impression is that it was false alarm. What do you think?
Hello Jurgen,
P3 doesn’t work on any of my hosts anymore because it’s not compatible with modern setups (the plugin hasn’t been updated for 3 years), so I can’t benchmark this against my own sites. Which PHP version is this with? If you’re looking for speed improvements, the first step before anything else would be to run PHP7.In your last screenshot, you can hover the dots in the graph, this will reveal the url.
Personally I don’t find 0.22 seconds high in absolute terms, but I think it should normally be faster – this may simply be a system configuration thing, upgrading PHP would be a great first step (although you’d need to find another way to time because P3 is not compatible with PHP7). What I don’t understand is how the PDF invoice plugin affects load time of the front-end pages. It’s not doing anything there. Again, this too could be a system configuration thing. If your server does not support autoloading, it may be loading all the plugin files even when it doesn’t need them.
tl;dr: I wouldn’t worry too much about this for now, try upgrading to PHP7 if possible.
Thanks Ewout for taking the time to elaborate on this. And of course thanks again for the great plugin!
I’ll see what I can do.
Hi Ewout,
I have upgraded to PHP 7 and the site’s definitely quicker. But recently I have also checked the error logs and unfortunately quite some errors have been written from your great plugin it seems. Maybe it has to do with the relatively high load it causes?
16.02.2018 07:24:58 silverbackprotein.nl [client 192.0.99.0] AH01797: client denied by server configuration: 15.02.2018 07:25:03 silverbackprotein.nl [client 192.0.100.0] AH01797: client denied by server configuration: /home/strato/http/power/rid/15/58/57121558/htdocs/WordPress_SecureMode_01/wp-content/uploads/wpo_wcpdf/attachments/factuur-SP_2018_02_2043.pdf
15.02.2018 07:25:05 silverbackprotein.nl [client 192.0.100.0] AH01797: client denied by server configuration: /home/strato/http/power/rid/15/58/57121558/htdocs/WordPress_SecureMode_01/wp-content/uploads/wpo_wcpdf/attachments/factuur-SP_2018_02_2044.pdf
/home/strato/http/power/rid/15/58/57121558/htdocs/WordPress_SecureMode_01/wp-content/uploads/wpo_wcpdf/attachments/factuur-SP_2018_02_2043.pdf
16.02.2018 07:24:59 silverbackprotein.nl [client 192.0.99.0] AH01797: client denied by server configuration: /home/strato/http/power/rid/15/58/57121558/htdocs/WordPress_SecureMode_01/wp-content/uploads/wpo_wcpdf/attachments/factuur-SP_2018_02_2044.pdf
16.02.2018 07:25:01 silverbackprotein.nl [client 192.0.99.0] AH01797: client denied by server configuration: /home/strato/http/power/rid/15/58/57121558/htdocs/WordPress_SecureMode_01/wp-content/uploads/wpo_wcpdf/attachments/factuur-SP_2018_02_2045.pdfAny idea what causes this?
Thanks again in advance!
Looks like your server does not allow sending the PDF files as attachment (as it refers to the attachment location rather than any PHP proces). Maybe try sending via SMTP with a plugin like WP Mail SMTP. Also check if all write permissions are set correctly (WooCommerce > PDF Invoices > Status).
Ewout
Thanks again for your quick reaction.
Point is that the plugin works exactly as it should from functional perspective. PDF’s are always included in the outgoing mails and everything is created as it should. I’ve checked the settings under status and everything is green (system configuration[except GMagick] as well as write permissions).
So I can’t yet explain the errors in my log…
Hi! I recommend contacting your host, perhaps they can tell you more about this error. To me, it seems that this error is not related to the PHP process directly, because it refers to the pdf file rather than any code:
client denied by server configuration: /xxxx/factuur-SP_2018_02_2043.pdf
The topic ‘High plugin loadtime’ is closed to new replies.