Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching of data #4138

Closed
cesswairimu opened this issue Dec 6, 2018 · 9 comments
Closed

Caching of data #4138

cesswairimu opened this issue Dec 6, 2018 · 9 comments
Assignees
Milestone

Comments

@cesswairimu
Copy link
Collaborator

Implement weekly caching of data to address the performance issues that may result from collating so much data.

@vaarigupta
Copy link

hello @cesswairimu I am an outreachy applicant and excited to work on this issue. How can I start contributing ? what is it all about?

@cesswairimu
Copy link
Collaborator Author

cesswairimu commented Mar 21, 2019

Hello @vaarigupta.
It is about caching data in various places in the site to fasten page load esp on this page which loads a lot of dynamic data http://publiclab.org/stats
Also I want to optimize the queries in http://github.com/publiclab/plots2/blob/master/app/controllers/stats_controller.rb on this issue too. If you are interested in doing any of these we can break down this to minit-tasks and work on it together. Thanks.

@ananya
Copy link
Member

ananya commented Mar 21, 2019

If @vaarigupta is not working on the issue then I would like to work on this. I am new to the organsation and would be happy to contribute.

@vaarigupta
Copy link

Hello @vaarigupta.
It is about caching data in various places in the site to fasten page load esp on this page which loads a lot of dynamic data http://publiclab.org/stats
Also I want to optimize the queries in http://github.com/publiclab/plots2/blob/master/app/controllers/stats_controller.rb on this issue too. If you are interested in doing any of these we can break down this to minit-tasks and work on it together. Thanks.

ya I can do. Please guide me how to start working on it?

@jywarren
Copy link
Member

jywarren commented May 7, 2019

Hi, all! @cesswairimu is this perhaps already done? If not, what would be the next step here? Thanks a lot!

@cesswairimu
Copy link
Collaborator Author

Hey @jywarren, I didn't really get around to doing this and from #5524 it seems like its still an issue and we could do some caching of the data esp for the stats page, per yearly maybe so that retrieval could be faster. Not sure how to go about this yet but would like to investigate more on this when I get some time.Thanks

@cesswairimu cesswairimu changed the title Weekly caching of data Caching of data May 8, 2019
@skilfullycurled
Copy link
Contributor

Hey everyone, wanted to ask a follow up question: suppose you want to view (not download) a years worth of data. Does 365 daily caches help the issue of wanting to view a years worth of data? Or, would easing the load of a years worth of data require a cache for that year? I ask because I'm wondering to what extent this will address a part of the issue @cesswairimu referenced in #5524 regarding stats overload which I think includes the problem larger viewings.

@cesswairimu
Copy link
Collaborator Author

@skilfullycurled No, I do think so, what happens is if you query a year's worth of data, say 01/2012-12/2012 it stores the results in a cache, and if you execute the same range after say two hours it will return the cached results instead of performing the same query again.

@cesswairimu
Copy link
Collaborator Author

I think we have cached most parts of the stats. Closing this. Thanks all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants