p3 plugin performance shows currency switcher causing slow load time
-
Hi,
i am currently finishing off a biggish e-commerce website (1000 products) and the site is running super slow. i think there are lots of problems but a quick test with P3 – Plugin Performance Profiler showed Currency Switcher taking a huge chunk of the plugin load time. With currency switcher turned on the load time was 12 seconds, with it switched off it was 2 seconds.
Any idea why it would be causing this much of a problem?
i am not a technical person, just the website owner populating the site and wondering why its running so slowly!
thanks
-
Hi James,
Just taking a quick look at the Currency Switcher plugin and it looks like the problem is the number of products you’re passing in. The plugin uses php’s include() to render the output for each price. This is a pretty normal practice (P3 does it, too) but it doesn’t scale to 1,000 prices well.
I can’t be 100% certain without running an xdebug profile, but php’s include() is known to be slow. It has to read the file (which means permission checks, file system access) and then parse it and convert it to object code and execute it. Using a recent version of PHP or an object cache (like XCache, APC, Zend Optimizer+, etc.) may help this.
Hope this helps! Good luck!
Hi Kurt, thanks for the info but i am not very tech savvy so i think i am going to need to bring in a professional. i have run P3 a few more times and the currency switcher does not always have the same impact… Very confusing but thanks for your input
Hello James! @james-longly
Thank you Kurt! @kurtpayne
Let’s think together. Plugin works only for products that are currently displayed on the page (it does not matter how many products in the store total) I think you do not displays all 1,000 products on one page:). If the conversion price plugin queries the database only once(for all products on page), then using this hook woocommerce_get_price and doing simple math(it’s very fast).
Make sure that you use only one plugin for conversion of prices. Maybe you use some sort of plug-in, which competes with Woof codeHello
Some notices, Woocs uses recount on the fly without requests to the data base as all data loaded into the memory by get_option function which calls only one time. So I have an idea about competitive script only.
Install please https://wordpress.org/plugins/query-monitor/ this plugin and with it help you will see which script takes resources …
Hi,
thanks @pavloborysenko and @realmag777 but i am afraid i don’t understand what you are talking about as i am not a technical person – i am just the website owner trying to work out why it is running so slowly. i installed the query monitor plugin but i dont know how to interpret the information it gives me.
As i said before i think i am going to need to employ an expert to look into it for me
here are the warnings the query monitor gave me btw
PHP Error Count Location Call Stack Component
Warning file_get_contents(D:\Web\DOPESEEDS/wp-content/object-cache.php): failed to open stream: No such file or directory 1 wp-content/plugins/w3-total-cache/ObjectCache_Environment.php:169 file_get_contents()
wp-content/plugins/w3-total-cache/ObjectCache_Environment.php:169
W3TC\ObjectCache_Environment->is_objectcache_add_in()
wp-content/plugins/w3-total-cache/ObjectCache_Environment.php:139
W3TC\ObjectCache_Environment->delete_addin()
wp-content/plugins/w3-total-cache/ObjectCache_Environment.php:31
W3TC\ObjectCache_Environment->fix_on_wpadmin_request()
wp-content/plugins/w3-total-cache/Root_Environment.php:28
W3TC\Root_Environment->fix_in_wpadmin()
wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php:709
W3TC\Generic_Plugin_Admin->admin_notices()
Unknown location
do_action(‘admin_notices’)
wp-admin/admin-header.php:250 Plugin: w3-total-cache
file_get_contents(D:\Web\DOPESEEDS/wp-content/db.php): failed to open stream: No such file or directory 1 wp-content/plugins/w3-total-cache/DbCache_Environment.php:164 file_get_contents()
wp-content/plugins/w3-total-cache/DbCache_Environment.php:164
W3TC\DbCache_Environment->is_dbcache_add_in()
wp-content/plugins/w3-total-cache/DbCache_Environment.php:135
W3TC\DbCache_Environment->delete_addin()
wp-content/plugins/w3-total-cache/DbCache_Environment.php:26
W3TC\DbCache_Environment->fix_on_wpadmin_request()
wp-content/plugins/w3-total-cache/Root_Environment.php:28
W3TC\Root_Environment->fix_in_wpadmin()
wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php:709
W3TC\Generic_Plugin_Admin->admin_notices()
Unknown location
do_action(‘admin_notices’)
wp-admin/admin-header.php:250 Plugin: w3-total-cache
Notice Undefined index: hardcron 1 wp-content/plugins/bitcoin-payments-for-woocommerce/bwwc-cron.php:13 wp-content/plugins/bitcoin-payments-for-woocommerce/bwwc-include-all.php
wp-content/plugins/bitcoin-payments-for-woocommerce/bwwc-include-all.php:57 Plugin: bitcoin-payments-for-woocommerce
PHP
Property Value
version 5.4.8
sapi cgi-fcgi
user nt authority\iusr
max_execution_time -1
Overridden at runtime from 30
memory_limit 256M
Overridden at runtime from 128M
upload_max_filesize 20M
post_max_size 20M
display_errors
Overridden at runtime from 0
log_errors 1
error_reporting 0Database
Property Value
extension mysql
server version 5.5.28
client version 5.0.10 (0.0.5)
user d000p333
host localhost
database atdata
key_buffer_size 8388608
~8 MB
max_allowed_packet 1048576
~1 MB
max_connections 100
query_cache_limit 1048576
~1 MB
query_cache_size 0 (Help)
query_cache_type ON
WordPress
Property Value
version 4.6.1
WP_DEBUG false
WP_DEBUG_DISPLAY true
WP_DEBUG_LOG false
SCRIPT_DEBUG false
WP_CACHE true
CONCATENATE_SCRIPTS undefined
COMPRESS_SCRIPTS undefined
COMPRESS_CSS undefined
WP_LOCAL_DEV undefined
Server
Property Value
software Microsoft-IIS
version 7.5
address Unknown
host S16524824Hello @james-longly
Please pass on the shop page (with the included plugins Woocs ). And make screenshot(or video) like this ( http://clip2net.com/s/3EEfqHC ). If you have slow queries ( http://clip2net.com/s/3EEh28r ) – create screenshots ex:(http://clip2net.com/s/3EEi6bC)
the web site is test.dope-seeds.com
i have lots of plugins including woocs and woocommerce
here are 2 screen shots form my admin area
http://test.dope-seeds.com/query-monitor1.jpg
http://test.dope-seeds.com/warnings.jpgi think all of this is way above what i understand so i am not sure i am going to get anywhere on my own even with your kind help
Hello @james-longly
I look at your site test.dope-seeds.com everything work fine. the load time was 2-3 seconds.
I need screenshots from the page products(there is a issue). Not admin page.
And you use premium version, so write please in support invato(use contact form) – https://codecanyon.net/item/woocommerce-currency-switcher/8085217/support
- The topic ‘p3 plugin performance shows currency switcher causing slow load time’ is closed to new replies.