I checked the second suggestion from Stackoverflow.com and here is the result:
The query changed from 1.265 sec to:
0.1250 sec when LIMIT 100 is included at the end of the line “ORDER BY comment_post_ID DESC, comment_ID DESC“
0.0000 sec when the same line is changed to ORDER BY comment_date_gmt DESC LIMIT 100
As far as I can see, the new query returns the same rows as the original one, but is now as fast as it possibly can be. I won’t be able to browse older comments forever in the Widget now, but I think 17 pages with comments should be enough for most of my readers with the LIMIT 100 statement.
I’ve updated line 1204 in class-bwp-recent-comments.php with the following code:
$grouped_sql_orderby = ' ORDER BY comment_date_gmt DESC LIMIT 100 ';