It's not a panacea, but in my case setting browser.tabs.unloadOnLowMemory in about:config helped a bunch.