<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>madogiwa0124</author_name>
  <author_url>https://blog.hatena.ne.jp/madogiwa0124/</author_url>
  <blog_title>Madogiwa Blog</blog_title>
  <blog_url>https://madogiwa0124.hatenablog.com/</blog_url>
  <categories>
    <anon>開発</anon>
    <anon>フロントエンド</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>フロントエンドでAPIリクエストを扱う際、大量のデータを一度に取得するとパフォーマンスに影響を与えることがあります。 単純な非同期リクエストを適切なサイズに分割し、Promise.allを使って効率的に処理するような実装をしたところパフォーマンス改善ができたのでメモ📝 サンプル リクエストを分割してPromise.allで非同期処理を並列実行する 任意のサイズで配列を分割する 非同期処理を並列に処理する おわりに 参考 サンプル 例えば、以下のように一度に大量のデータを取得する場合を考えます。 async function fetchData() { const ids = [1, 2, 3]…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmadogiwa0124.hatenablog.com%2Fentry%2F2025%2F02%2F15%2F184457&quot; title=&quot;JavaScript: 大量の非同期リクエストを任意のサイズに分割して並列処理するメモ📝 - Madogiwa Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-02-15 18:44:57</published>
  <title>JavaScript: 大量の非同期リクエストを任意のサイズに分割して並列処理するメモ📝</title>
  <type>rich</type>
  <url>https://madogiwa0124.hatenablog.com/entry/2025/02/15/184457</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
