Why do you need so many open tabs to begin with? What is your usecase?
Firefox
A place to discuss the news and latest developments on the open-source browser Firefox
You are manually caching web content. Were you aware that (a) your browser does that for you; (b) the internet does that for you ?
I'm as guilty of this as anyone and can tell you from experience that it's sutpid.
Install Onetab
I tend to have ~10,000 tabs because I obsessively fail to clean up. But it never takes much memory or cpu, my PC isn't amazing yet Firefox is always lightning quick.
I've never used the discard or merge windows features though, I can see why those might cause issues. I assume these two functions just aren't optimised for so many tabs.
One addon I might recommend to help keep numbers down is Duplicate Tab Closer, which has options to specify how similar tabs can be to be considered duplicates, and also will detect across all open windows if desired.