[openstreetmap/openstreetmap-website] Slow response in rendering phase while calling /map endpoint (Issue #6057)
Mahmoud Hanafy
notifications at github.com
Tue May 27 06:28:29 UTC 2025
mahmoudhanafy created an issue (openstreetmap/openstreetmap-website#6057)
Hi Team, Thanks for the great work you are doing. I'm completely new to ruby and to this project.
I'm currently running a local version of osm-website, and I'm calling this endpoint:
```
https://myLocalWebsite/api/0.6/map?bbox=46.699791,24.6334425,46.7233944,24.6471732
```
but it's taking too long in the rendering phase, I see the following line in logs:
```
Completed 200 OK in 25244ms (Views: 19820.2ms | ActiveRecord: 4122.8ms (26457 queries, 24031 cached) | GC: 1631.1ms)
```
I see a lot of queries like this:
```
SELECT "changesets".* FROM "changesets" WHERE "changesets"."id" = $1 LIMIT $2
```
So I have updated maps_controller to include changeset with nodes [here](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/api/maps_controller.rb#L31), instead of loading it while rendering. it improved the performance but it's still taking around 11-12 seconds.
When I'm trying the same request on the public website, it's taking less than 1 second (even without my change)
```
https://api.openstreetmap.org/api/0.6/map?bbox=46.699791,24.6334425,46.7233944,24.6471732
```
So I'm wondering if there is any type of caching or multi-threading happening on the public website but not happening on my version.
Thanks in advance,
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6057
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6057 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250526/b1f492bd/attachment.htm>
More information about the rails-dev
mailing list