Skip to main content
Topic: Collapsed categories (Read 6065 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Collapsed categories

Since I'm not so expert on the performance-side of things, I was just wondering: how important is not grab and process the data of collapsed categories?

I'm asking this because if these data would be included even if the category is collapsed, it would be much easier to toggle categories without reload the page (i.e. we wouldn't need to fetch data through AJAX to "open" the category) and we could drop the entire table in favour of using the "normal" smc_Toggle (and so themes, right?).
Bugs creator.
Features destroyer.
Template killer.

Re: Collapsed categories

Reply #1

Well, they get excluded at query time, and they get to bypass the query board access fun, which is surprisingly inefficient.

On the other hand, if a category is collapsed, how likely is it someone is going to reopen it again? Most of the time it would be better to not bother fetching it anyway - and it saves bandwidth. Never underestimate the value of saving bandwidth.

Re: Collapsed categories

Reply #2

And another question that came to my mind just now is: how many people do actually have categories collapsed?

I don't have any good answer, and I have access only to a handful of databases, basically three forums and the percentages are: 0.35%, 1.68%, 0.46% (range of users from ~300 up to ~80k).
I'm curious to know what the percentage is at sm.org (since it's a "technical" forum I would expect users know about the feature and uses it if they are interested, so it should be one of the highest...even though it should be corrected by the spammers...).

If you (all) run any forum, would you mind digging a bit in the database and get back with some percentages? Just for fun! O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Collapsed categories

Reply #3

QuoteAnd another question that came to my mind just now is: how many people do actually have categories collapsed?

Fantastic question. On my forums, I don't generally allow any categories to be collapsed but then again I tend to run 1 or 2 categories in the first place.


If a low percentage of them have them collapsed, you don't gain anything by AJAXifying the feature and you certainly don't improve your lot by chucking out information that is only maybe going to be used. More usefully than asking how many boards are collapsed, would be interesting to know how many of them are changed after the event - of which I suspect the answer is surprisingly few.

The real question: do you bother saving it and processing it on the server when you could just assume all the boards are open and save it on the client, e.g. in localStorage and just apply smc_Toggle that way. That way even guests could collapse a forum (and not invoke cookies as such)

It's an interesting question but personally I'd still err on the side of doing it on the server and not showing the data in the first place - if you really need to get it, return it AJAXively on the uncollapse invocation. The whole board access thing is still not cheap and if you can exclude entire categories, it is going to help vs not doing it at all.