Dear.. anyone,
I have set up a forum for e-learning environment for a university, whereby each course will have its own forum. For this reason, each faculties will have it's own group and each course (belong to one faculty) will have it's own forum.
It end up with 1900+ forums created and each users will only see their related forums (less than 50).
There's no issues when logging in as normal users.
However, when i log in as administrator, I will need to wait the page to load for almost 30secs. And another 25 seconds if i were to collapse any of the group.
It might be caused by the fact that there are 1900+ forums but is there a way to optimize this ?
best regards,
Supianto
haathi featuring a blog..
It's hosted on its university's own server, Dual Xeon 3.2, 2GB of RAM
running on Win2003, IIS6, SQL Server 2005
It's not really surprising, considering the unusually high number of forums you have on the site. My view of the communityserver.org forums homepage lists around 33 forums and the page weighs approximately 77K. If you're viewing all 1900 forums in a single page, then we're talking about a page that will have a page weight of almost 4MB! Your browser needs to process that inordinate amount of markup and script, which explains the load times you're experiencing.
There's not really much you can do in terms of optimisation in the face of those sort of numbers. If you don't need to have every forum group listed as part of your view, then you can use the personalize link to hide forum groups that you don't want to see. If you do need to have each group listed, then the best you can do is probably to collapse every group and access individual forums from the group level.
Thanks Gary,
I tried to hide the forums using personalized view and it did a good job to speed up the loading time.in the case where i need to access that forum, i would go through the steps to unhide it.
Is it possible to make the groups collapsed by default? so the next time i need to access that forum, i would only need to expand it.(since personalized view setting page is also take a long time to load)
thx and regards,
Wouldn't it be better to show all forum groups, but always keep them collapsed and just access individual forums by viewing the forum group list?
There's no method in the UI to let you collapse all forum groups by default, but if you save this code into a .aspx page, it should do the job for you:
<%@ Page Language="C#" %><%@ Import Namespace="CommunityServer" %><%@ Import Namespace="CommunityServer.Components" %><%@ Import Namespace="CommunityServer.Discussions.Components" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> void Collapse_Click(Object sender, EventArgs e) { User user = CSContext.Current.User; if (user != null) { ArrayList groups = ForumGroups.GetForumGroups(false); foreach (CommunityServer.Components.Group group in groups) { user.AddMinimizedGroup(group.GroupID); } Users.UpdateUser(user); Message.Text = groups.Count.ToString() + " groups collapsed."; Message.Visible = true; } } void Expand_Click(Object sender, EventArgs e) { User user = CSContext.Current.User; if (user != null) { ArrayList groups = ForumGroups.GetForumGroups(false); foreach (CommunityServer.Components.Group group in groups) { user.RemoveMinimizedGroup(group.GroupID); } Users.UpdateUser(user); Message.Text = groups.Count.ToString() + " groups expanded."; Message.Visible = true; } }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Collapse/expand all forum groups</title></head><body> <form id="form1" runat="server"> <table width="400"> <tr> <td><asp:Button runat="server" ID="Collapse" Text="Collapse all groups" OnClick="Collapse_Click" /></td> <td><asp:Button runat="server" ID="Expand" Text="Expand all groups" OnClick="Expand_Click" /></td> </tr> </table> <asp:Label runat="server" ID="Message" Visible="false" /> </form></body></html>
Thanks a million Gary..
From testing ur code, i just found out that if the forum group is collapsed, the next time the user logs in, it will still be collapse.
So if the forum administrator wish, i'll recommend them to collapse all the forum group first. the next time they login, it'll be fast.
Thanks again
Best regards,
supianto
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com