# Odd behaviour of the "New Topics" count?

**URL:** https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547
**Category:** Support
**Created:** [3월 22, 2018, 11:35오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547 "2018-03-22T11:35:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![thorbenegberts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thorbenegberts/32/120119_2.png) [@thorbenegberts](https://meta.discourse.org/u/thorbenegberts)
#### Post date: [3월 22, 2018, 11:35오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/1 "2018-03-22T11:35:49Z")

</div>

Hi there,

one of our users reported an odd behaviour of the “New Topics” count in `/new/`. He reported it in January. I tried to reproduce it ever since to recognize a pattern, but I wasn’t able to. So I’m reaching out to you.

The “new” count is correct for some days but seems to be reset at some point. Is there some kind of (maybe wanted) mechanism that resets the “new” count after a few days? Or does the query only display new topics within a certain time span?

Here my settings:

 ![17](https://global.discourse-cdn.com/meta/original/3X/f/d/fd4ea01481ecfe3ddd19793b937fce7e61207bb7.png)

_(Version: Discourse 2.0.0.beta4 - [GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. · GitHub](https://github.com/discourse/discourse) version fa95699fde72c8a0028a2195217da05066f0eaf8, hosted instance [forum.plentymarkets.com](http://forum.plentymarkets.com))_

---

<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: [3월 22, 2018, 11:39오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/2 "2018-03-22T11:39:25Z")

</div>

I believe if the user lets the new count pile up endlessly, eventually they will hit a cap. @sam would probably know specifics.

Remember the default in Discourse is “consider topics new when … created in the last 2 days”

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [3월 22, 2018, 11:10오후 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/3 "2018-03-22T23:10:22Z")

</div>

Yes! “Consider topics new if I haven’t viewed them yet” has some built in safeguards to avoid trading in enormously expensive queries.

In particular:

> <https://github.com/discourse/discourse/blob/f5a3be750c99f3ba89126c61dda51df0571dbe4e/app/jobs/scheduled/periodical_updates.rb#L46-L50>

We allow for max\_new\_topics total on the site.

> <https://github.com/discourse/discourse/blob/main/config/site_settings.yml#L1163-L1166>

This is a hidden site setting which is hardcoded to 500. We can probably bump it up on your site a bit, but it risks introducing performance problems.

---

<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: [3월 23, 2018, 1:31오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/4 "2018-03-23T01:31:29Z")

</div>

I’m not really seeing where there would be a great need to “show all of them”.

I set my preferences to “new when haven’t read them” and was presented with more than enough. True, the number said 500 and after reading a bunch the next time it again said 500. So I suppose it could be a bit confusing to those that don’t understand what’s going on. But it isn’t like I read anywhere near 500 all in one go let alone if there had been all of them.

Maybe simply having a plus 500+ would be good enough?

---

<div class="post-metadata">

### Author: ![thorbenegberts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thorbenegberts/32/120119_2.png) [@thorbenegberts](https://meta.discourse.org/u/thorbenegberts)
#### Post date: [3월 23, 2018, 9:58오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/5 "2018-03-23T09:58:45Z")

</div>

Okay, and in combination with `SiteSetting.min_new_topics_time` some new topics will “disappear”, so the actual count of unseen topics can be over 500.

Explains a lot to us. Thanks for the information! For some people this won’t be ideal, but I understand the need for it.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [3월 23, 2018, 10:00오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/6 "2018-03-23T10:00:14Z")

</div>

I can probably bump it up to 1000 or 2000 on your site if you want, but we need a hard limit to keep performance reasonable

---

<div class="post-metadata">

### Author: ![thorbenegberts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thorbenegberts/32/120119_2.png) [@thorbenegberts](https://meta.discourse.org/u/thorbenegberts)
#### Post date: [3월 23, 2018, 10:11오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/7 "2018-03-23T10:11:11Z")

</div>

Thanks, but I think there is no need for that.

What I don’t fully understand is that in my tests I never exceeded a count of 78 over 3 weeks. In between it dropped to 64, 59 and even 48, even if I didn’t read that many topics (or did I?). As I mentioned above, I use the “I haven’t viewed them yet” setting. In my understanding new topics would have to pile up till 500 if I’m an inactive user, but thats not the case. As I suggested in my previous post, does it somehow interfere with the `SiteSetting.min_new_topics_time` property?

I don’t think thats a bug, I just want to say something plausible to our customers 😉

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [3월 23, 2018, 10:14오전 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/8 "2018-03-23T10:14:47Z")

</div>

Yeah, I get why it is confusing, the number is global not per user, we hunt for the 500th topic that was bumped globally, and the never allow any new topics beyond that

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 8, 2024, 12:37오후 UTC](https://meta.discourse.org/t/odd-behaviour-of-the-new-topics-count/83547/9 "2024-06-08T12:37:42Z")

</div>

이 주제는 2270일 후 자동으로 닫혔습니다. 더 이상 답변을 남길 수 없습니다.
