我创建了一个基于WP的智能界面,用于管理客户端
每次返回/查看客户端时,它都会使用大量信息和数据。
it is a locked interface and does not have traffic spikes
在过去的一个月里,我看到了内存和CPU使用率的大幅飙升,因此,我安装了调试栏并打开了所有选项。
我所看到的是,每次wordpress都包括wp header博客和模板加载器(或者我错了?)-我可以申报一下吗?
here is an example from the queries tab in the debug bar
\'clientsocialurls\'
require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/sagive-manager/category.php\'), include(\'/themes/sagive-manager/tabs/tab-siteinfo.php\'), get_page_by_title #47 (14.4ms)
SELECT ID FROM armnd_posts WHERE post_title = \'זמנהוף שירותי תרגום\' AND post_type= \'cheques\'
require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/sagive-manager/category.php\'), include(\'/themes/sagive-manager/tabs/tab-cheques.php\'), get_page_by_title #48 (3.9ms)
SELECT armnd_posts.* FROM armnd_posts WHERE 1=1 AND armnd_posts.post_type = \'attachments\' AND (armnd_posts.post_status = \'publish\') ORDER BY armnd_posts.post_date ASC
require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/sagive-manager/category.php\'), include(\'/themes/sagive-manager/tabs/tab-attachments.php\'), get_posts, WP_Query->query, WP_Query->get_posts #49 (34.7ms)
SELECT post_id, meta_key, meta_value FROM armn_postmeta WHERE post_id IN (2073,2086,2093,2104,2109,2114,2119,2137,2143,2148,2154,2160,2165,2174,2178,2186,2274,2650,2708,3163,3356,3507,3644,3673,3893,3924,4039,4139,4286,4311,4515,4596,4666,4698,4722,4738,4740,4841,4860,4908,5219,5941,6086,6317) ORDER BY meta_id ASC
require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/sagive-manager/category.php\'), include(\'/themes/sagive-manager/tabs/tab-attachments.php\'), get_posts, WP_Query->query, WP_Query->get_posts, update_post_caches, update_postmeta_cache, update_meta_cache #50 (9.9ms)
SELECT armnd_posts.* FROM armnd_posts WHERE 1=1 AND armnd_posts.post_parent = 2119 AND armnd_posts.post_type = \'attachment\' AND (armnd_posts.post_status = \'inherit\') ORDER BY armnd_posts.post_date DESC
require(\'wp-blog-header.php\'), require_once(\'wp-includes/template-loader.php\'), include(\'/themes/sagive-manager/category.php\'), include(\'/themes/sagive-manager/tabs/tab-attachments.php\'), get_posts, WP_Query->query, WP_Query->get_posts
does this means wordpress loads both files each time a query is called?我是否可以“声明”它们一次,以最大限度地减少内存使用和加载时间?
我完全没有抓住要点,你能分享一些降低CPU使用率的技巧吗;内存使用率,如果它是一个给定的我不能使用缓存插件。