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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>People have already mentioned most of what I wanted to recommend, so I’ll just list them again with a bit of explanation.</p>
<p>The Erlang VM uses reductions to schedule execution and trigger GC, so the best approach is to write small functions and avoid creating overly large variables (a thousand reductions can lead to high memory usage).</p>
<p>Hibernate processes (to reduce memory usage) when they need to wait a long time for new messages.</p>
<p>Manually trigger GC after function calls that may produce a lot of memory.</p>
<p>Push state to ETS tables (with the <code>:compressed</code> option), then terminate the process.</p>
<p>Use streams for processing when dealing with potentially large memory usage (e.g., big lists).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="388046" data-batch-url="/posts/batch_likers">
                        1
                      </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/agent-keeps-large-binary-memory-despite-no-state/75180/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-388046" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="388046"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>