[openstreetmap/openstreetmap-website] Add the ability to rate limit edits (PR #4319)
Tom Hughes
notifications at github.com
Mon Oct 30 09:26:09 UTC 2023
Well sure the data is available (which is all the API being able to fetch it proved) but we put limits on that API call - we don't just allow people to fetch a user's entire edit history because of the cost of doing that.
Talking about the API is irrelevant anyway because the server code doesn't use the API or parse XML to do things like this, it just executes `current_user.changesets.sum(:num_changes)` but that will turn into something like:
```sql
SELECT SUM("changesets"."num_changes") FROM "changesets" WHERE "changesets"."user_id" = $1
```
which forces the database to read all the changeset records for the user.
I doubt the edit link uses that API call either - why would iD care about your previous changesets?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4319#issuecomment-1784794983
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4319/c1784794983 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231030/e4fa5bcd/attachment-0001.htm>
More information about the rails-dev
mailing list