admin管理员组文章数量:1289877
Post saving took much time. I have action to save custom metas using update_post_meta
add_action( 'save_post_property', 'propertys_save' );
function propertys_save($id) {
foreach($_POST['meta'] as $k => $v) {
$time_start = microtime(true);
update_post_meta($id,$k,$v);
echo microtime(true) - $time_start
}
}
and i get this average timing:
0.16451787948608
And if i call update_post_meta
anywhere in another place (for example admin-ajax.php?action=123) it will take:
0.00014281272888184s
It's 1000 times faster... Is there any way to speed it up?
本文标签: Update post meta is slow while saving post
版权声明:本文标题:Update post meta is slow while saving post 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741459665a2379960.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论