[openstreetmap/openstreetmap-website] Move SPAMMY_PHRASES to the database (Issue #6510)
Pablo Brasero
notifications at github.com
Tue Nov 11 12:01:30 UTC 2025
pablobm left a comment (openstreetmap/openstreetmap-website#6510)
That'll depend on the size of the list and the frequency of signups. If both are small enough, the current code should do the job. I just had a quick look and I'm seeing 13 SELECT queries and a single INSERT query generated as a result of a successful `POST /users` request, so initially a new SELECT with a reasonable payload shouldn't be much trouble. Also, from the numbers I've seen, I get the impression that although we have many users, we are not in the "hundreds per minute" signups territory at the moment.
If these parameters change (more signups, more phrases) then we can adapt. For example we could load the list from DB into memory only when the application restarts. Tradeoff that phrases won't be effective immediately, but saves us a potentially costly SELECT every time. Forked processes can share the list thanks to the magic of copy-on-write. (I don't know how our application servers work so this might not apply).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6510#issuecomment-3516548032
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6510/3516548032 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251111/8d5c3835/attachment.htm>
More information about the rails-dev
mailing list