<p></p>
<blockquote>
<p dir="auto">You mention N+1 queries, and those are definitely worth solving, that might be worth doing in a separate PR</p>
</blockquote>
<p dir="auto">Changeset and User Loads seem to be one of the culprits, although they mostly end up being served by the cache. Preloading might be all it takes to get rid of them.</p>
<p dir="auto">Nodes:</p>
<pre class="notranslate"><code class="notranslate">  CACHE Changeset Load (0.0ms)  SELECT "changesets".* FROM "changesets" WHERE "changesets"."id" = $1 LIMIT $2  [["id", 1874767], ["LIMIT", 1]]
  ↳ app/views/api/nodes/_node.xml.builder:7
  CACHE User Load (0.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  ↳ app/views/api/nodes/_node.xml.builder:7
</code></pre>
<p dir="auto">Ways:</p>
<pre class="notranslate"><code class="notranslate">  CACHE Changeset Load (0.0ms)  SELECT "changesets".* FROM "changesets" WHERE "changesets"."id" = $1 LIMIT $2  [["id", 1874767], ["LIMIT", 1]]
  ↳ app/views/api/ways/_way.xml.builder:7
  CACHE User Load (0.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  ↳ app/views/api/ways/_way.xml.builder:7
  Node Load (1.2ms)  SELECT "current_nodes".* FROM "current_nodes" INNER JOIN "current_way_nodes" ON "current_nodes"."id" = "current_way_nodes"."node_id" WHERE "current_way_nodes"."way_id" = $1 ORDER BY "current_way_nodes"."sequence_id" ASC  [["way_id", 4000394980]]
  ↳ app/views/api/ways/_way.xml.builder:12
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4141#issuecomment-1712917532">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLYA7PQXOQ4S7ZDWR3XZYII5ANCNFSM6AAAAAA3HBJHTE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLK7UEW5A7CSSXQS3QDXZYII5A5CNFSM6AAAAAA3HBJHTGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGDEGBY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4141/c1712917532</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4141#issuecomment-1712917532",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4141#issuecomment-1712917532",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>