# Just how bad is it to have 750 categories

**URL:** https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206
**Category:** Community Building
**Created:** [12월 2, 2017, 12:42오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206 "2017-12-02T00:42:36Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12월 2, 2017, 12:42오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/1 "2017-12-02T00:42:36Z")

</div>

I’m importing a Ning community about oil rights. The belief is that those who own rights in one county don’t care a whit about what’s happening in other counties.

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/0/906ef4e5972150d47b9bc7c6752be8d5f638b436.png)

I’ve read [It’s Time We Talked About Tags](https://blog.discourse.org/2017/10/its-time-we-talked-about-tags/) and paid attention to, I think, every topic about the issue over the past ten months.

There are about 10 general interest categories, and then about 20 state categories and each state has 5-50 counties for a whopping total of something like 750. I’ve tried to figure a way around it, but have failed to find a better solution.

One thing I’ve considered is using groups to limit access to categories so that people would see only the categories they care about then they hit /latest or /top (which I can still do).

The problem with that scenario is that it’s important that search engines be able to see all of the categories.

It seems OK on the test site (4GB DO droplet). /categories loads in 1012.8ms and /latest loads in 726.

Is this a horrible mistake?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [12월 2, 2017, 12:43오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/2 "2017-12-02T00:43:41Z")

</div>

It’s not a _disaster_ if you can keep it under 1000, but I am not sure users will be able to comprehend that many categories. I dunno. Try it, see how it works, and report back in 6 months?

It’s good that you checked the page load times, though, that’s certainly advisable.

> [@pfaffman](#):
>
> The belief is that those who own rights in one county don’t care a whit about what’s happening in other counties.

So why not dump them into their tag view and have that be their homepage? I’m not sure why that would be so problematic? Do they really _need_ security here?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12월 2, 2017, 12:51오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/3 "2017-12-02T00:51:56Z")

</div>

Your willingness to edit people’s comments never ceases to amaze me, but that’s not important now.

> [@codinghorror](#):
>
> It’s not a disaster if you can keep it under 1000

That’s something of a relief.

> [@codinghorror](#):
>
> but I am not sure users will be able to comprehend that many categories.

I’d think the same, but they’ve been comprehending them on Ning, which I find hard to . . . comprehend.

> [@codinghorror](#):
>
> So why not dump them into their tag view and have that be their homepage?

Well, partly because I’m not that familiar with tag view, perhaps I should do some re-reading.

> [@codinghorror](#):
>
> Do they really need security here?

No. They don’t need security; using groups to limit access was my attempt at giving people just the trickle they want from the fire hose. They need to be able to see only the counties that they care about. If you’ve got minerals in Oklahoma, you don’t care about the goings on anywhere else.

And when the people in Whosit County Kentucky generate 200 posts a month about their dirt, there is a bunch of noise for most people.

Is it possible to mute all tags by default and then un-mute the ones you care about? That might solve the problem.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [12월 2, 2017, 1:02오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/4 "2017-12-02T01:02:55Z")

</div>

Just don’t ever visit the homepage; come in at your preferred county. If this is the case, the only time you’d ever need to _see_ the homepage is on your first visit, yes?

Heck a static HTML page with a map that people clicked, linking to the appropriate tag for that county, would be the best homepage in this case, yes?

So maybe the feature request is to make a tag route your preferred homepage, or even a _category_ cc @sam we already allow people to select latest, categories, or top as their preferred homepage.. why not a category or tag (or group!), at that point? why not?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12월 2, 2017, 1:05오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/5 "2017-12-02T01:05:24Z")

</div>

> [@codinghorror](#):
>
> Just don’t ever visit the homepage; come in at your preferred county.

That _almost_ does it.

I have a topic that is a list of very county category, so that’s a start, **but** you might care about 10 county categories plus the 10 top-level general interest categories.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [12월 2, 2017, 1:08오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/6 "2017-12-02T01:08:04Z")

</div>

> [@codinghorror](#):
>
> Just don’t ever visit the homepage; come in at your preferred county

Yeah, this is how I plan to deal with this issue on a similar setup. Direct people straight to their ‘home’ category.

If I hit performance problems with 1k categories, I’ll also restrict the loading of categories in the [site model](https://github.com/discourse/discourse/blob/master/app/models/site.rb#L28) somehow. It loads all categories by default whenever you load the site.

@pfaffman I’m very curious to hear how this turns out actually.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [12월 2, 2017, 1:31오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/7 "2017-12-02T01:31:57Z")

</div>

It looks like you have a category per county. With state code as a “comma code” at the end.

Is it too late to rethink hierarchy? For me, having parent categories would help. If not by state, some other geopolitical boundary. I might miss out on something “hot” happening in a far county. But would I be all that interested in keeping up with three time zones away?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12월 2, 2017, 1:34오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/8 "2017-12-02T01:34:48Z")

</div>

> [@Mittineague](#):
>
> Is it too late to rethink hierarchy

Mostly. We have State parent categories, so there are only about 30 top-level categories.

---

<div class="post-metadata">

### Author: ![ron\_jeremy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ron_jeremy/32/56621_2.png) [@ron\_jeremy](https://meta.discourse.org/u/ron_jeremy)
#### Post date: [12월 2, 2017, 1:51오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/9 "2017-12-02T01:51:52Z")

</div>

A hornet’s nest is the only thing that comes to mind when i think of managing 750 categories. Hell, Craigslist likely covers the entire country with less than 750 categories.

Could you create one category per state and create sticky topics in each category to cover the counties? You’d also have the freedom to use the category for ‘general state talj’ etc.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [12월 2, 2017, 2:05오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/10 "2017-12-02T02:05:21Z")

</div>

I might try country region as parents with states as subs, then tags for the counties. As tags, leaving the state code in the name would a good idea.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12월 2, 2017, 2:17오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/11 "2017-12-02T02:17:15Z")

</div>

> [@ron\_jeremy](#):
>
> Hell, Craigslist likely covers the entire country with less than 750 categories.

If that’s true, it’s because they skip over a whole bunch of places. 750 is just counties that have mineral rights. And about 30 states don’t have any.

Again, they managed 750 “groups” on Ning, so that’s what they’re used to (which doesn’t really make it any less crazy, but that’s another matter).

---

<div class="post-metadata">

### Author: ![sbernhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sbernhard/32/208186_2.png) [@sbernhard](https://meta.discourse.org/u/sbernhard)
#### Post date: [11월 29, 2020, 8:00오전 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/12 "2020-11-29T08:00:27Z")

</div>

저도 비슷한 문제를 겪고 있습니다:  
메인 카테고리가 매우 많습니다(약 800개) 각각 약 5개의 하위 카테고리가 있습니다. 일반 사용자는 약 10개의 메인 카테고리에만 접근할 수 있습니다.

질문은 다음과 같습니다:

- 접근 권한으로 인해 대부분의 메인 카테고리에 접근할 수 없더라도 일반 사용자에게 성능 문제가 발생합니까?
- 모든 메인 카테고리에 접근할 수 있는 관리자의 경우는 어떻게 됩니까? 카테고리 수가 많아서 시스템이 무너질까요?

Discourse는 토론 생태계를 구축하는 훌륭한 도구입니다. 저처럼 그룹을 사용하여 카테고리 접근을 그렇게까지 제한하는 대규모 설치 환경을 가진 사람이 거의 저뿐인지 궁금합니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [11월 29, 2020, 1:25오후 UTC](https://meta.discourse.org/t/just-how-bad-is-it-to-have-750-categories/75206/13 "2020-11-29T13:25:47Z")

</div>

월간 페이지뷰가 약 50만 회에 달하는 사이트를 운영 중입니다. 카테고리가 수백 개나 되는데( ~~대략 300개 정도인 것 같지만~~ 수정: 814개입니다). 시스템 사양은 2코어 {4스레드} CPU와 16GB RAM을 갖춘 비교적 빠른 환경입니다. 성능은 괜찮은 편입니다. DigitalOcean의 8GB CPU 최적화 인스턴스를 사용했던 것으로 기억합니다.

시도해 보는 것 말고는 다른 방법이 없다고 생각합니다. 각 그룹 간의 상호작용이 적다면 멀티사이트(multisite) 인스턴스로 전환하여 여러 데이터베이스로 분산할 수 있습니다. 단일 사이트를 SSO 서버로 공유하는 방식도 가능합니다.

중앙값 기준 성능은 꽤 좋은 편이지만, 99퍼센타일(99th percentile) 성능은 상당히 나쁜 편입니다:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/9/c91d4492b329150eb2b736259eb8fa8e995e7ede.png)
