ActivityWatch / ActivityWatch/activitywatch

Query Caching

未关闭
#991 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
improves: performance improves: ux module: webui stale type: enhancement
主要语言
Python
星标
18.9k
派生
1k
平均合并
1 天 4 小时
30 天内合并 PR
28

描述

I've thought about adding proper caching of queries to make browsing historical data much snappier, after the first open.

The goal is to:
- make the day/week/month selector (simple barchart at top) load faster
- make the "Timeline (Barchart)" load faster

As a first step, I've considered adding query caching to aw-client-js such that queries are:

- cached by timespan
- if timespan spans the future, don't cache
- only cached if the query returned data for the timespan

Should be a simple improvement, that could massively improve responsiveness and thus general UX of web UI, especially when browsing historical data.

I'm not sure what kind of cache expiry to add, but I might figure that out as I get going.

PRs:
- https://github.com/ActivityWatch/aw-client-js/pull/44
- https://github.com/ActivityWatch/aw-webui/pull/501

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。