Conversation
Member
Author
|
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduce repeated datastore work on watcher and dashboard requests, and stream large exports with bounded event memory.
Changes:
?cache=0bypasses caching.This PR depends on ActivityWatch/aw-core#159. Both pyproject.toml and poetry.lock pin the tested aw-core commit while these coordinated changes are reviewed. The release dependency can replace that pin after the companion changes ship.
Validation:
make test: 104 passed, 2 deliberate skips for disk backends in the API-only concurrency test.git diff --checkpassed. Companion core: 253 passed, 2 existing skips; mypy and Ruff passed.python scripts/profile-api-query.py --baseline-ref master --queries 5measured 151.756 ms median; cProfile attributed 1.728 / 1.760 seconds to Peewee get_events (row hydration and date parsing).--cachemeasured 0.014 ms median. Both use the same installed backend and disposable 10,000-event data.The cache tracks writes made through this ServerAPI instance. As with the existing heartbeat cache, independently modifying the database outside the running server is not a supported live-coherency mechanism; restarting clears cached state.