<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="232135" data-post-id="232135">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="moogle19" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/moogle19/120/24423_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  moogle19
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For the prior benchmarks I used csv files from here: <a href="https://www.stats.govt.nz/large-datasets/csv-files-for-download/" rel="noopener nofollow ugc">https://www.stats.govt.nz/large-datasets/csv-files-for-download/</a></p>
<p><code>Geographic units, by industry and statistical area: 2000–2021 descending order – CSV</code> is ~ 120MB when unzipped.<br>
But I am not sure how the number of columns affects the runtime. The example has only 5 columns.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232135" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-232135" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232135"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="232136" data-post-id="232136">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lud" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/120/14382_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lud
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I used the <a href="https://github.com/dashbitco/nimble_csv/tree/v1.1.0/bench/data" rel="noopener nofollow ugc"><code>10000_sales.csv</code> file from NimbleCsv</a>, I duplicated the content until the total size was 20M (19.2 Mio). It has 15 columns.</p>
<p>Now with this code using chunks it takes 2.8 seconds with <code>wget</code> to download the JSON data (size is 50M), although in the browser it loads forever.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule XsvWeb.PageController do
  use XsvWeb, :controller

  alias NimbleCSV.RFC4180, as: CSV

  def index(conn, _params) do
    conn = send_chunked(conn, 200)
    send_csv(conn, "big_sales.csv")
  end

  defp send_csv(conn, file) do
    csv_stream = csv_stream(file)
    {:ok, conn} = chunk(conn, "[")

    conn =
      Enum.reduce_while(csv_stream, conn, fn chunk, conn -&gt;
        case Plug.Conn.chunk(conn, chunk) do
          {:ok, conn} -&gt;
            {:cont, conn}

          {:error, :closed} -&gt;
            {:halt, conn}
        end
      end)

    {:ok, conn} = chunk(conn, "]")
    conn
  end

  defp csv_stream(file) do
    headers = headers(file)
    headers |&gt; IO.inspect(label: ~S[headers])

    stream =
      file
      |&gt; File.stream!()
      |&gt; CSV.parse_stream(skip_headers: true)

    stream
    |&gt; Stream.take(1)
    |&gt; Stream.map(fn x -&gt; Enum.zip(headers, x) |&gt; Map.new() |&gt; Jason.encode_to_iodata!() end)
    |&gt; Stream.concat(
      stream
      |&gt; Stream.drop(1)
      |&gt; Stream.map(fn x -&gt;
        [?,, Enum.zip(headers, x) |&gt; Map.new() |&gt; Jason.encode_to_iodata!()]
      end)
    )
  end

  defp headers(file) do
    file
    |&gt; File.stream!()
    |&gt; Stream.take(1)
    |&gt; CSV.parse_stream(skip_headers: false)
    |&gt; Enum.at(0)
  end
end
</code></pre>
<p>Note that the browser makes it slow to display but with <code>fetch("http://localhost:4000/").then(x =&gt; x.json()).then(x =&gt; console.log('x', x))</code> it is still less than 4 seconds for 54.8 MB of JSON.</p>
<p>Now <a class="mention" href="/u/quda" rel="nofollow">@quda</a> I know it is not the original problem but converting to JSON makes the final file size more than twice as big. Is it possible to just send the CSV file? or JSON arrays instead of objects?</p>
<p>That being said I do not think it is possible to beat something as simple as basic PHP like you said:</p>
<pre data-code-wrap="php"><code class="lang-php">&lt;?php
$csvFile = file('big_sales.csv');
$data = [];
foreach ($csvFile as $i =&gt; $line) {

   if ($i == 0) {
      $headers = str_getcsv($line);
   } else {
      $row = str_getcsv($line);
      $data[] = array_combine($headers, $row);
   }

}

echo json_encode($data, JSON_PRETTY_PRINT);
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232136" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-232136" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232136"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-solved cat-solved" title="Marked as solution"></div>
  </section>
</div>
    <div class="postbit" id="232140" data-post-id="232140">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="quda" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/quda/120/33107_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  quda
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/lud" rel="nofollow">@lud</a> you’re right about (not) beating php.<br>
Very disappointed.<br>
We were asked to migrate/refactory the old backend for APIs, developed 7 years ago on php5/nginx because it recently started to have performance issues: too many concurrent calls from the downstream API consumers. The cpu and memory were always at 100% on this server.<br>
The idea of our IT solution architect was to switch to the Elixir/Phoenix stack for it’s performance using concurrent connections.<br>
But it seem that this stack is far for being fast on processing individual requests… <img src="https://forum.elixirforum.com/images/emoji/apple/neutral_face.png?v=15" title=":neutral_face:" class="emoji" alt=":neutral_face:" loading="lazy" width="20" height="20"><br>
Honestly, I couldn’t imagine there it can be something worse than php in terms of performance.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232140" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-232140" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232140"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="232141" data-post-id="232141">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>EDIT: <a class="mention" href="/u/lud" rel="nofollow">@lud</a>’s code is more complete than mine, I only demonstrated how to avoid passing huge collections around.</p>
<hr>
<aside class="quote no-group" data-username="lud" data-post="21" data-topic="43893" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/48/14382_2.png" class="avatar"> lud:</div>
<blockquote>
<p><a class="mention" href="/u/quda" rel="nofollow">@quda</a> Could you give us a big anonymized file so we can try stuff?</p>
</blockquote>
</aside>
<p>Seconded, without that we can just theorize until the end of time.</p>
<hr>
<p>I agree with <a class="mention" href="/u/lostkobrakai" rel="nofollow">@LostKobrakai</a> that memory is likely not a problem but I disagree it should be the default solution. You can use streaming with a big buffer and get the best of both words: low rate of hitting your storage + predictable memory usage.</p>
<hr>
<p><a class="mention" href="/u/quda" rel="nofollow">@quda</a> Here is a complete example on how I would do it:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def for_each_csv_row(path, processor) when is_function(processor, 1) do
  path
  |&gt; Path.expand(__DIR__) # or `Path.absname` if you need that.
  |&gt; File.stream!([], 256 * 1024) # use a 256KB streaming buffer.
  |&gt; NimbleCSV.RFC4180.parse_stream(skip_headers: false)
  |&gt; Enum.map(processor) # --- FUNCTIONAL PROGRAMMING, HELL YEAH! ---
  # or you can use `Enum.each` if you don't want to convert the values
  # and only need the side effects.
end
</code></pre>
<p>It is absolutely meaningless to utilize optimal methods for accessing data if you just end up assigning it to a huge variable in the end and return it from a function. It’s best if you pass a function that operates on a single record instead. That way the full collection of original elements will never be in the memory and the runtime won’t have to copy it around – you’ll only get the converted collection in the end. (Or if you only need side effects you won’t even have the resulting collection in memory as well.)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232141" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-232141" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232141"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="232142" data-post-id="232142">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="lud" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/120/14382_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  lud
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I find Elixir and Phoenix a joy to work with. Individual requests are generally very fast for common purposes. But here you are doing a lot of string manipulations and iterating over large chunks of data, witch is not what Elixir is designed to do fast, unfortunately.</p>
<blockquote>
<p>Honestly, I couldn’t imagine there it can be something worse than php in terms of performance.</p>
</blockquote>
<p>I have been a long time user of PHP and I am surprised of your comment. PHP uses a lot of C code and is quite fast for many things actually. Lots of PHP libraries are bloated with overengineered, convoluted, interface-heavy APIs but the raw performance is there (to my taste at least).</p>
<p>Now, If you just need to serve static CSV files that are just sitting in the app directory, why not just write the JSON version in the same directory at the same time and just serve that?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232142" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-232142" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232142"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="232143" data-post-id="232143">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="quda" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/quda/120/33107_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  quda
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for suggestion. I don’t understand what this <em>processor</em> function is</p>
<aside class="quote no-group" data-username="dimitarvp" data-post="25" data-topic="43893">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p><code>when is_function(processor, 1)</code></p>
</blockquote>
</aside> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232143" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-232143" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232143"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="232145" data-post-id="232145">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>How much Elixir did you learn before coming to the forum? Do you know the basics of functional programming?</p>
<p>I personally prefer to give people good advice <em>after they have done some homework</em> and not before. Still, let me add to my example so it is at least complete:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">#
# The function signature `[first, second, third, fourth, fifth]` is just an example
# for when your CSV records have five fields: first name, last name, age,
# employee position and salary.
#
processor = fn [first, second, third, fourth, fifth] -&gt;
  %{
    first_name: first,
    last_name: second,
    age: third,
    position: fourth,
    salary: fifth
  }
end
</code></pre>
<p>Passing that to the function I gave you above will yield a list of maps in the shape visible in the <code>processor</code> function.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232145" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-232145" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232145"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="232146" data-post-id="232146">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="quda" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/quda/120/33107_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  quda
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="lud" data-post="26" data-topic="43893">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lud/48/14382_2.png" class="avatar"> lud:</div>
<blockquote>
<p>Lots of PHP libraries are bloated with overengineered, convoluted, interface-heavy APIs but the raw performance is there (to my taste at least).</p>
</blockquote>
</aside>
<p>Exactly ! This php backend became an unmanageable beast in the last years (thousands of internal commits made by people are not working anymore in this project), that’s why it was decided to refactory it using a better stack. Slim, less code, better manageability. And better performance on concurrent calls.<br>
Unfortunately, it seems Elixir/Phoenix is not suitable for this.<br>
We will look forward to alternatives.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232146" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-232146" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232146"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="232147" data-post-id="232147">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="derek-zhou" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/derek-zhou/120/19943_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  derek-zhou
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>My suggestion is to use <a class="mention" href="/u/lud" rel="nofollow">@lud</a> 's solution to see if it is good enough or not.<br>
If you still want more speed, you can write a native csv to json converter in a command line tool using rust or go, reading from the FS and writing to stdout. That should be doable in 100 LOC. Then use a port to run the converter and stream the chunked results to HTTP. That should be trivial in Elixir. I believe you can achieve line speed in this case.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232147" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-232147" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232147"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="232148" data-post-id="232148">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="quda" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/quda/120/33107_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  quda
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="28" data-topic="43893">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Passing that to the function I gave you above will yield a list of maps in the shape visible in the <code>processor</code> function.</p>
</blockquote>
</aside>
<p>You could have explained this from the beginning.<br>
It does not matter my (humble) experience on Elixir. I was assigned to do this task, given a deadline and I have to do it. That’s why I appealed to this forum. I thought here members are supposed to help people like me not (only) <em>experts</em> in Elixir.<br>
No offence, though. <img src="https://forum.elixirforum.com/images/emoji/apple/slightly_smiling_face.png?v=15" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="232148" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-json-api-extremely-slow-when-serving-csv-files/43893/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-232148" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="232148"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/43893/load_more?page=4">Load more posts (18 remaining)</a>
</div></template></turbo-stream>