Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces several enhancements aimed at improving API speed and overall application performance. Key changes include:
- New utility scripts for processing and analyzing DVM events.
- Updates to the frontend API polling intervals from 1 second to 60 seconds.
- Enhancements in API caching and logging configuration, including a memory-aware cache implementation.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utility/publish_dvm_announcement_to_nostr.py | New utility script for publishing DVM announcements to Nostr. |
| utility/count_unique_dvm_authors.py | New script to count unique DVM authors using batch processing. |
| utility/count_raw_events.py | New script to count total rows in the raw_events table. |
| utility/count_events_by_kind.py | New script to generate AsciiDoc output of event counts by kind. |
| frontend/dvmdash-frontend/lib/api.ts | Updated API refresh intervals for improved performance. |
| api/src/main.py | Enhancements in caching, logging configuration, and API endpoints. |
| api/requirements.txt | Added cachetools dependency. |
| api/logging_config.json | New logging configuration for Uvicorn. |
| api/Dockerfile.local & api/Dockerfile | Updated CMD to use the new log configuration. |
Comments suppressed due to low confidence (1)
api/src/main.py:74
- The eviction condition uses CACHE_GB_LIMIT which is set to 1.0, making the condition equivalent to checking if self.memory_usage + size_estimate exceeds self.memory_threshold. Consider clarifying the intended logic or updating the constant to better reflect the desired eviction threshold.
if (self.memory_usage + size_estimate > CACHE_GB_LIMIT * self.memory_threshold):
Owner
Author
|
There's also some utility scripts for generating documentation in this PR as well. |
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.
No description provided.