these marked unread messages are slowing Moodle down

these marked unread messages are slowing Moodle down

by N Hansen -
Number of replies: 5
I have noticed a serious slowdown in the loadtime for the Using Moodle main course page since this message read tracking thing has been implemented. I find the screen much too busy anymore. Would it speed it up if there were some sort of simple indicator like a simple icon to indicate that a forum contains unread posts? I don't see that it is necessary to know the number of unread posts, but rather the fact there are ones. And why is the unread column still there if you choose not to track posts?
Average of ratings: -
In reply to N Hansen

Re: these marked unread messages are slowing Moodle down

by Michael Penney -
Hmm, while the number of unread may be unwieldy in a course the size of using moodle (it loads fine for me but I have DSL at home and an OC3 at work), it's exactly what our teachers (with courses in the 20-150 student range) have been asking for, so I hope the feature stays.

However, if loading is a problem, wouldn't an icon take just as long as a number? Presumably the the load time is in checking each forum for each user and then displaying a number from the db, I'm not sure it would be much faster to show an icon, but that would seem to me to be an issue of db optimization at Moodle.org?

Eg, if Martin et. all want to optimize the feature, they need to test it under heavy load, like that of using moodle. Perhaps load times, browser, and connection type would be useful in a bug report?

And why is the unread column still there if you choose not to track posts?

I would guess because Moodle.org is running pre-beta code? Is there a bug report on this issue?
In reply to N Hansen

Re: these marked unread messages are slowing Moodle down

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If you turn tracking off in your profile then you won't see any unread columns anywhere (looks more like 1.4).

Michael is right, there's little difference in showing a number or not speed-wise since the calculations need to be done anyway. The display is a string, though, so if you don't like it you can change it to a space or something in your language pack. Or otherwise change the appearance using CSS.

That said, I find Using Moodle now loads in under a second (0.7 secs) now without forum tracking, and about 1.2 secs even with forum tracking on. I have been doing a lot of optimising behind the scenes in the past couple of weeks. One of the things I did was enable mod_gzip - it seems to work a lot better with Firefox than IE, so try that.
In reply to Martin Dougiamas

Re: these marked unread messages are slowing Moodle down

by N Hansen -
If you just shut off tracking in a single forum, it still shows the unread column (with -); it only disappears if you shut off tracking completely.
In reply to N Hansen

Re: these marked unread messages are slowing Moodle down

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This is intentional, actually, to show that you COULD have tracking, but it's disabled in the current forum.

Tracking is CPU-intensive, certainly.  Even though a lot of improvements have been made to it in the past few weeks, Moodle 1.5 ships with the defaults all disabled to help prevent any nasty surprises.
In reply to Martin Dougiamas

Re: these marked unread messages are slowing Moodle down

by Martín Langhoff -
"Tracking is CPU-intensive, certainly."

Yep. It is probably CPU and disk intensive (on the DB server). I haven't had much time to look into it yet sad

We can't use it unless it really scales well, so it either scales well now, or it'll improve over the 1.5.x series as we learn about it.

(Once we migrate our large installs to 1.5 we'll have really juicy performance profiling data. There are some really interesting database profiling scripts Penny's put together that read the database logs and tell you all sorts of interesting things about what to optimize ;)