<p dir="auto">Use subqueries to do the selection in one go in the database which also avoids to deduplicate in rails.</p>
<p dir="auto">Also pushes all visibility filtering into the query.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5636'>https://github.com/openstreetmap/openstreetmap-website/pull/5636</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/commits/ba481319f4c86528054c0490a0846ea7474c6612" class="commit-link">ba48131</a> Use subqueries to find nested members more efficiently</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/files">4 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/files#diff-d0c415c93927717bf92fd6ece85b5cc01c84f55b09f91d45cc551c240f3e3e5e">app/controllers/api/nodes/relations_controller.rb</a>
(13)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/files#diff-ecbf28e16d58d55c7b9a4df33d04401e38b1828b2f728087917042fb76338556">app/controllers/api/nodes/ways_controller.rb</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/files#diff-5f2d76d57a466f17519491f3061b6c6e5219538f115abc653ee6543ac0819b24">app/controllers/api/relations/relations_controller.rb</a>
(13)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5636/files#diff-84fd18c1f9b0f3659dc02bf624c9e0928260921d92ebe3da82993a070e328088">app/controllers/api/ways/relations_controller.rb</a>
(13)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5636.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5636.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5636.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5636.diff</a></li>
</ul>
<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/5636">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLPXIMCANBIMBQMFN32O5ZUZAVCNFSM6AAAAABWY6JFPSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHA2DANZWGM2TKMQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPZIWIJKJDRVIHS2U32O5ZUZA5CNFSM6AAAAABWY6JFPSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKSUU4UA.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/5636</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/5636",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5636",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>