View Single Post
Old 2015-04-27, 14:01   #962
James Heinrich
James Heinrich's Avatar
"James Heinrich"
May 2004
ex-Northern Ontario

3×1,039 Posts

Originally Posted by Madpoo View Post
The problem with that one (and it pre-dated any changes I made) is that the full history has SOOOO many ECM curve results that loading it takes a very long time.
My approach in a case like that, where generating a page with a lot of slow queries but the contents are mostly static, is to cache the generated HTML to a database table. The generate will be slow the first time, but once the first person has looked at it it's lightning-fast for everyone else. Then whenever new data is submitted that would affect the displayed page (new ECM run, factor found, whatever) that row is easily cleared from the database. In a case like this you could even hardcode an exception for known-problem exponents like M1277 (or any of the small exponents with much ECM) to not clear the cache on a trivial update (yet another ECM curve run) but only if a factor is found or similar major change.
James Heinrich is offline   Reply With Quote