simple-lightbox
simple-lightbox copied to clipboard
Issue: Slow SLB_Base_Object->get_file() HTTP API Call
Description of Problem
Using Query Monitor I noticed a lag on some of my pages from an HTTP API Call by Simple Lightbox which is taking 2.5809 seconds! I'm very curious what this call is for and why it may be slow. The site is on a Vultr VPS server running nginx and PHP7 so I don't think it's a hosting issue.
1 | GEThttps://docs.wp-bullet.com/wp-content/plugins/simple-lightbox/themes/baseline/layout.html | 200 OK | +SLB_Base_Object->get_file()wp-content/plugins/simple-lightbox/includes/class.base_object.php:254 | Plugin: simple-lightbox | 5 | 2.5809
Screenshot https://i.imgur.com/aSxPPlT.png
Details
- URL of Page exhibiting problem: https://docs.wp-bullet.com
- Browser(s) exhibiting problem: Chrome
- Version of SLB Installed: 2.6.0
- Other plugins installed:
| name | status | update | version |
+----------------------------------------------+--------+-----------+---------+
| disable-blogging | active | none | 2.0.4 |
| ewww-image-optimizer | active | none | 4.0.2 |
| generate-press-navigation | active | none | |
| google-analytics-dashboard-for-wp | active | none | 5.1.2.2 |
| gp-premium | active | none | 1.5.2 |
| mailgun | active | none | 1.5.8.5 |
| worker | active | none | 4.2.27 |
| query-monitor | active | none | 2.17.0 |
| shortcodes-docs | active | none | 1.0 |
| simple-css | active | none | 1.1 |
| simple-image-sizes | active | none | 3.1.1 |
| simple-lightbox | active | none | 2.6.0 |
| svg-support | active | none | 2.3.11 |
| updraftplus | active | none | 1.13.12 |
| wedocs | active | none | 1.3.3 |
| media-library-plus/maxgalleria-media-library | active | none | 4.0.4 |
| wp-downloader | active | none | 2.0 |
| wp-file-manager | active | none | 1.8 |
| wp-theme-optimizer | active | none | 1.1.4 |
| wordpress-seo | active | available | 5.7.1 |
+----------------------------------------------+--------+-----------+---------+
Using wp profile I also found these are taking a bit longer than I'd like and are even running on pages where there are no images. I'd like to help optimize these if possible.
With Lightbox active where it should load
wp profile hook --all --spotlight --allow-root --url=https://docs.wp-bullet.com/docs/assets-manager/disable-emojis
+-------------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| callback | location | time | query_time | query_count | cache_ratio | cache_hits | cache_misses | request_time | request_count |
+-------------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| wpseo_init() | wordpress-seo/wp-seo-main.php:261 | 0.0176s | 0s | 0 | 100% | 34 | 0 | 0s | 0 |
| slb_init() | simple-lightbox/main.php:20 | 0.0198s | 0s | 0 | | 0 | 0 | 0s | 0 |
| wp_enqueue_scripts() | wp-includes/script-loader.php:1294 | 0.0029s | 0.0001s | 1 | 98.57% | 69 | 1 | 0s | 0 |
| WPSEO_Frontend->head() | wordpress-seo/frontend/class-frontend.php:663 | 0.0076s | 0.0005s | 5 | 92.79% | 103 | 8 | 0s | 0 |
| wp_print_head_scripts() | wp-includes/script-loader.php:1248 | 0.0009s | 0.0001s | 1 | 62.5% | 5 | 3 | 0s | 0 |
| wp_site_icon() | wp-includes/general-template.php:2797 | 0.0027s | 0.0001s | 2 | 94.92% | 56 | 3 | 0s | 0 |
| wp_make_content_images_responsive() | wp-includes/media.php:1315 | 0.0018s | 0.0003s | 3 | 33.33% | 2 | 4 | 0s | 0 |
| SLB_Lightbox->activate_links() | simple-lightbox/controller.php:473 | 0.008s | 0.0002s | 2 | 93.62% | 44 | 3 | 0s | 0 |
| wp_print_footer_scripts() | wp-includes/script-loader.php:1277 | 0.0931s | 0.0003s | 3 | 100% | 24 | 0 | 0.0861s | 1 |
+-------------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| total (9) | | 0.1544s | 0.0017s | 17 | 84.47% | 337 | 22 | 0.0861s | 1 |
+-------------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
No Images but light box still loading
wp profile hook --all --spotlight --allow-root --url=https://docs.wp-bullet.com/
+--------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| callback | location | time | query_time | query_count | cache_ratio | cache_hits | cache_misses | request_time | request_count |
+--------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| wpseo_init() | wordpress-seo/wp-seo-main.php:261 | 0.0176s | 0s | 0 | 100% | 34 | 0 | 0s | 0 |
| slb_init() | simple-lightbox/main.php:20 | 0.0212s | 0s | 0 | | 0 | 0 | 0s | 0 |
| wp_enqueue_scripts() | wp-includes/script-loader.php:1294 | 0.0031s | 0.0001s | 1 | 98.57% | 69 | 1 | 0s | 0 |
| WPSEO_Frontend->head() | wordpress-seo/frontend/class-frontend.php:663 | 0.0066s | 0.0002s | 2 | 97.81% | 134 | 3 | 0s | 0 |
| wp_print_head_scripts() | wp-includes/script-loader.php:1248 | 0.0009s | 0.0001s | 1 | 62.5% | 5 | 3 | 0s | 0 |
| wp_site_icon() | wp-includes/general-template.php:2797 | 0.003s | 0.0002s | 2 | 94.92% | 56 | 3 | 0s | 0 |
| do_shortcode() | wp-includes/shortcodes.php:202 | 0.0101s | 0.0012s | 13 | 84.21% | 96 | 18 | 0s | 0 |
| SLB_Lightbox->activate_links() | simple-lightbox/controller.php:473 | 0.0283s | 0.0024s | 28 | 94.28% | 379 | 23 | 0s | 0 |
+--------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+
| total (8) | | 0.0909s | 0.0041s | 47 | 90.33% | 773 | 51 | 0s | 0 |
+--------------------------------+-----------------------------------------------+---------+------------+-------------+-------------+------------+--------------+--------------+---------------+