perf: deduplicate homepage DB query #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "perf/deduplicate-homepage-queries"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
analyzeTrends()now accepts optional pre-fetchedHistoricalPrice[]to avoid re-querying the database/route was callinggetPriceHistory()andanalyzeTrends()separately, butanalyzeTrendsinternally calledgetPriceHistory()again — now passes its already-fetched dataanalyzeTrends()into a single pass (also fixes optimization #6)Impact
Eliminates one full
getPriceHistoryDB query per homepage load.e8f7bcc95ctob10124d2df