# La consulta RSS puede tardar 20 minutos o más en procesar un feed

**URL:** https://meta.discourse.org/t/rss-polling-may-take-20-minutes-and-more-to-process-a-feed/412322
**Category:** UX
**Tags:** rss-polling, fixed
**Created:** [13 Septiembre, 2026 20:41 UTC](https://meta.discourse.org/t/rss-polling-may-take-20-minutes-and-more-to-process-a-feed/412322 "2026-09-13T20:41:42Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [15 Septiembre, 2026 08:27 UTC](https://meta.discourse.org/t/rss-polling-may-take-20-minutes-and-more-to-process-a-feed/412322/5 "2026-09-15T08:27:09Z")

</div>

tengo un par de PRs en desarrollo que deberían mejorar drásticamente la velocidad de sondeo/importación de feeds grandes

> <https://github.com/discourse/discourse/pull/43643>
>
> Previously, \`TopicEmbed.topic\_embed\_by\_url\` matched \`embed\_url\` with a case-inse…nsitive regex, which can't use an index, so every lookup scanned the whole \`topic\_embeds\` table. RSS polling runs this lookup for every item of every feed on every poll, so re-polling an unchanged 1,600-item feed took ~230s on a site with 100k embeds.
> 
> This change matches \`lower(embed\_url)\` against the \`http\` and \`https\` variants of the normalized URL and adds an index on that expression, bringing the same re-poll down to ~5s. The oldest match is picked in Ruby instead of with \`ORDER BY id LIMIT 1\` because, until the new index has statistics, Postgres would walk the primary key rather than use it. Re-imports also compare \`user\_id\`s instead of loading the post's user for every item.
> 
> Reported at https://meta.discourse.org/t/412322

> <https://github.com/discourse/discourse/pull/43644>
>
> Previously, \`ImportedTopics\` matched every feed item URL in a single \`embed\_url …~\* ANY(ARRAY\[...\])\` query. Postgres only caches 32 compiled regexes, so with more patterns it recompiles them for every row it checks. With \`rss\_polling\_update\_tags\` disabled, a 1,600-item feed took ~25 minutes per poll on a site with 100k embeds.
> 
> This change looks topics up with \`TopicEmbed.with\_embed\_urls\`, which uses the \`lower(embed\_url)\` index (~0.1s for the same feed), only loads the columns it needs, and builds lookup keys with \`TopicEmbed.embed\_url\_key\` so they can't drift from the core query.
> 
> Reported at https://meta.discourse.org/t/412322
> 
> Stacked on https://github.com/discourse/discourse/pull/43643

---

_[View the full topic](https://meta.discourse.org/t/rss-polling-may-take-20-minutes-and-more-to-process-a-feed/412322)._
