Git Product home page Git Product logo

Comments (5)

nicolae-stroncea avatar nicolae-stroncea commented on May 25, 2024 1

I'll start working on it

from aw-server.

ErikBjare avatar ErikBjare commented on May 25, 2024 1

@nicolae-stroncea Glad to hear it! Keep us posted.

from aw-server.

ErikBjare avatar ErikBjare commented on May 25, 2024

This is problematic due to the start and end of a "day" not being well defined because of timezones. One could imagine summarizing over each hour-period, but I'd really like to find another solution as it comes with a lot of complexity.

We've discussed caching like this before, but I think the proper way to improve performance would be to profile the relevant query and find the bottleneck instead of looking into caching straight away.

from aw-server.

nicolae-stroncea avatar nicolae-stroncea commented on May 25, 2024

What can be done, is that you save the summary of the events at 00:00 daily without the time-zone. So you only write them to the database once. When summarizing over weeks, months, years, all the days in between will still be the same regardless of the time zone as you're essentially summarizing the same chunk of time. However, the difference will be in the first and last day, where the timezone does matter. Therefore you only have to summarize the first and the last day again, by taking the timezone into account, and just add it to the rest of the summarized days, and do analysis from there.

This would not decrease the time to calculate the summary throughout the day, but it would have a significant impact on summarizing over big timelines, which will become even more important as more features are added to analyze productivity.

from aw-server.

ErikBjare avatar ErikBjare commented on May 25, 2024

@nicolae-stroncea That is true, and we've thought about that before. But as long-term analysis is considered to be a rarely-used function it's not a priority. You described the solution well though, which I don't think anyone has taken the time to write down before, so that is appreciated.

We might get around to it some day, but there are far more pressing issues and the complexity it would contribute to add a cache like that is just not worth the hassle right now.

from aw-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.