seand11
Forum Replies Created
-
By the way, thank you for all your efforts on this excellent plugin. 🙂
Forum: Plugins
In reply to: [Plugin: W3 Total Cache] Memcached flush all my cacheAgreed! Please? 🙂
This seems to work for me. Thanks!
diff --git a/includes/plugin.ui.php b/includes/plugin.ui.php index cdedff9..5b07424 100644 --- a/includes/plugin.ui.php +++ b/includes/plugin.ui.php @@ -135,11 +135,7 @@ function wsl_user_custom_avatar($avatar, $id_or_email, $size, $default, $alt) { global $comment; if( get_option ('wsl_settings_users_avatars') && !empty ($avatar)) { - //Check if we are in a comment - if (!is_null ($comment) && !empty ($comment->user_id)) { - $user_id = $comment->user_id; - } - elseif(!empty ($id_or_email)) { + if(!empty ($id_or_email)) { if ( is_numeric($id_or_email) ) { $user_id = (int) $id_or_email; } @@ -150,7 +146,10 @@ function wsl_user_custom_avatar($avatar, $id_or_email, $size, $default, $alt) { $user_id = (int) $id_or_email->user_id; } } - // Get the thumbnail provided by WordPress Social Login + //Check if we are in a comment + if (!is_null ($comment) && !empty ($comment->user_id)) { + $user_id = $comment->user_id; // Get the thumbnail provided by WordPress Social Login + } if ($user_id) { if (($user_thumbnail = get_user_meta ($user_id, 'wsl_user_image', true)) !== false) { if (strlen (trim ($user_thumbnail)) > 0) {would you consider pastebinning a patch file so hopefully the maintainer will get this fix in?
thank you for sharing back your fix!
did you move it after as an elseif (to empty id_or_email) or if?
Thanks for all your efforts and the killer plugin msaari. 🙂
That index (on doc) made all the difference in the world. Near instantaneous on 600+ posts with 15000+ comments. Thanks! 🙂
That index (on doc) made all the difference in the world. Near instantaneous on 600+ posts with 15000+ comments. Thanks! 🙂
Thanks for the index details, I’ve added the index and will test now.
The posts seem to index fine… it’s when I add their 15,000 comments for the ~600 posts that things become unmanageable.doc did not have an index.
I have added one and will test.Looking over the code I do not believe it is currently part of the table creation on install:
$sql = "CREATE TABLE " . $relevanssi_table . " (id mediumint(9) NOT NULL AUTO_INCREMENT, " . "doc bigint(20) NOT NULL, " . "term varchar(50) NOT NULL, " . "tf mediumint(9) NOT NULL DEFAULT '0', " . "title tinyint(1) NOT NULL, " . "UNIQUE KEY id (id)) $charset_collate;"; dbDelta($sql); $sql = "CREATE INDEX terms ON $relevanssi_table (term(20))";Will let you know if any improvements.
Thanks!I was able to finally finish indexing about 650 items by DISABLING INDEXING OF COMMENTS… which I don’t feel is a long term solution as I’d like to search those as well and also this site is only 4 months old and will be getting many more posts.
This would appear to be a real issue for anyone with many posts or (for in my case) a community blog with several authors.
Just tried it by indexing a single (1) post and it took over 10 minutes… So I don’t think disabling all modules or otherwise to index and then reenable will be a solution as the indexing that gets done on hooks will fail.
Okay by rebuilding the index i was able to get rid of this, but after about 500 records even updating the index 1 record at a time takes like 10+ minutes… which I think eventually led to database corruption… I’ll continue that issue there. Thanks!
Same issue here… it seems to be the SELECTs and SELECT DISTINCTs rather than the INSERTS which are taking all the time:
http://ww.wp.xz.cn/support/topic/plugin-relevanssi-a-better-search-index-sql-becomes-unbearable-after-500-postsQuery_time: 580.831687 Lock_time: 0.000130 Rows_sent: 100 Rows_examined: 91229388Has to examine 91 million rows in this case!