Pages like old revisions or page history for each line call function $auth->getUserData(), which for DB auth backends produce 2 quiries to database. So if you set $conf['recent'] to 40 then each recent changes or old revisions page will produce at least 80 quiries to database. It's not a good behavior. You can fix it by adding simple cache mechanism to auth class. Here is a patch for mysql auth class.
Moreover, in most cases when Doku call getUserData() function, it doesn't need usergroups, only userinfo. So for increasing performance it's a good idea to add new optional boolean parameter $with_groups to getUserData() function, witch by default should be true, but when is setting to false getUserData() function shouldn't call _getGroups() function and should not return grps field in result array.
I've applied this changes in my Doku installation by creating my own auth class and editing editorinfo() function in common.php, so now I have only one query for each unique user at recent and revisions pages instead of $conf['recent']*2 which has default DokuWiki.