On Moodle 1.9.8, when viewing a faculty profile (while logged in as Admin), if I view the faculty member's forum posts, the page takes quite awhile to load.
Once it has loaded, these are the performance stats in the footer:
12.830042 secs
RAM: 17.1MB
RAM peak: 29.5MB
Included 111 files
DB queries 13051
Log writes 1
Load average: 0.40
Note that DB queries shows 13,051... It took this page 13s to generate (considering the # of queries, that's actually impressive), and uses 30mb of ram, all to display 5 forum posts, with a max of 2 pages in pagination.
This is quite shocking. The raw number of queries here, is something that I haven't seen since the days of PHP-Nuke popularity (which was very poor code indeed).
Why would thousands of queries be needed to simply pull up what posts a person has made?
I can understand additional queries being needed if there are a large number of courses (we have ~100 courses in our installation), but this suggests very poor design.