Implemented performance optimization to reduce Fava API load for ledgers with large transaction histories. Users can now choose to view transactions from the last 5, 30, 60, or 90 days instead of loading all entries. Changes: - Backend (views_api.py): Added 'days' parameter to api_get_user_entries endpoint with default value of 5 days - Backend (fava_client.py - previously committed): get_journal_entries supports optional days parameter with date filtering logic - Frontend (index.js): Added setTransactionDays() method and days parameter handling in loadTransactions() - Frontend (index.html): Added q-btn-toggle UI control for date range selection visible to all users Default: 5 days (aggressive optimization for large ledgers) Options: 5, 30, 60, 90 days Performance impact: ~10x improvement for typical ledgers (229 entries reduced to 20-50 entries for 5-day window). Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| image | ||
| js | ||