simplecrypto / simplecoin_multi

A multipool capable cryptocurrency mining frontend implementation for powerpool
MIT License
31 stars 43 forks source link

Convert some utils.py memoized functions to be scheduled & cached in redis #174

Open ericecook opened 9 years ago

ericecook commented 9 years ago

Specifically ones like

get_pool_hashrate() pool_share_tracker() orphan_percentage()

icook commented 9 years ago

I had been thinking on this one for a while, and ideally I'd like to modify flask cache in such a way that tasks like this could be at least semi-automatically generated/scheduled. This whole backend updating cached values is a really common pattern, and I'd like a more robust way to do it.

Definitely all extra at the moment tho. Not sure that these take very long when there's a cache miss anyway.

Related to #157

ericecook commented 9 years ago

Yea, I'm more just thinking for uniformity. That, and it means occasionally someone's page load waits for these to get cached, which could be related to #173

icook commented 9 years ago

We could profile them but I'd be pretty surprised if any of these queries take more than about 100ms.

ericecook commented 9 years ago

Yea, I agree its (probably) a minor performance difference. Uniformity is the main reason.