Comments (5)
I'll start working on it
from aw-server.
@nicolae-stroncea Glad to hear it! Keep us posted.
from aw-server.
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.
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.
@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)
- Requesting data from server too "quickly" results in `sqlite3.OperationalError`
- Logs filled up my disk for the second time HOT 1
- Build errors on AWS linux HOT 1
- API needs authentication or to stop using POST HOT 4
- `404` error when loading the dashboard HOT 1
- QueryParseException when semicolon in expression HOT 1
- Prometheus + Grafana? HOT 4
- aw-server shared library error HOT 1
- Unable to run the project locally. main.py and requirements.txt files missing HOT 1
- [Suggestion] Oracle Cloud Setup Tutorial HOT 1
- Mongo DB Config HOT 1
- Add the desktop entry to /usr/share/applications upon installation on linux
- High amount of I/O usage HOT 2
- [Windows] Import doesn't work
- 404 (127.0.0.1): GET /img/icons/apple-touch-icon-152x152.png HTTP/1.1 (flask:25)
- Search results for `Tools > Search` or `Tools > Query` don't include urls
- Setup CI/CD for ActivityWatch Server Docker building HOT 1
- Malformed sqlite database HOT 4
- IPv6 localhost [::1] server does not respond Windows 10
- Allow user to configure CORS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aw-server.