mirror of
https://github.com/Athou/commafeed.git
synced 2026-09-20 19:51:09 +00:00
Instead of querying the database once per entry to check if it already exists, fetch all existing guids for a feed in a single query upfront and filter new entries in memory before the per-entry loop. The per-entry findExisting call inside addEntry is kept as a safety net for concurrent inserts, but is now only reached for new entries. Profiling in real usage showed a ~50% reduction in guidHash queries, with the check falling from the most expensive query to sixth in the ranking.