I actually want to expand on our reasoning for not focusing on large discussion performance issues really quick, just in case someone finds this topic later and want's a proper explanation for our reasoning.
Problems
Giant discussions are hard to follow
Giant discussions are incredibly hard to follow. The simple truth is that no one is going to read all 5K-100K post in a discussion. This can sometimes make conversations confusing and/or just simply difficult to fully understand.
Flarum is not chat software
Despite having live updating discussions the feature is added as a convenience feature (prevent the need for refreshes) not as a feature to actively abuse for treating Flarum like a chat. There are now a couple of extensions (some real time, some async) for chatting with people, we would recommend these extensions if you want a chat feature.
Giant discussions are rare
Giant discussions are incredibly rare, despite the size of discuss and the fact that our database hasn't been reset you will likely only find maybe 3-4 giant discussions, despite the fact that there are more than 25 thousand discussions here now. Even on one of the largest Flarum installs with hundreds of thousands of discussions they have very few giant ones.
Further giant discussions usually indicate that the audience of a website is actually wanting a live chat feature, something that Flarum is not (see point above).
Suggestions
Break giant discussions down
If you have discussions you intend to be large (let's say a meet and greet discussion) break them down into individual discussions with logical breakpoints (weeks, months, years, etc.)
If the topic changes, create a new discussion
Flarum has the incredible "split discussion" extension that is perfect for creating a new discussion if the existing one has gone off-topic. This not only gets the original discussion back on topic, but also makes it so that everything that was off-topic now has a new home where people can talk about that new thing.