<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>アマゾンの検索をするとき、PHPでバッチ処理を書いた。PHPで大量のリクエストを発行してAmazonECS結果を見ていた。ふとメモリ消費量を見る。ちびりそうになる。メモリ消費量が上昇し続ける。unset()をしているが、メモリの消費量は変化しない。 立ち止まって考える。当たり前じゃないか。PHPはApacheのリクエスト毎に起動して、リクエスト終了時にメモリから全部消去される。バッチ処理が終わらないとメモリ解放されないのかね。処理が長くなれば不利じゃないか。繰り返し処理でメモリを再利用しない。なら、バッチの大量データを処理に不向きか。一応はコマンドラインで動きます程度なのね。 もし、PHPバッ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F20070509%2F1178705008&quot; title=&quot;phpでバッチ処理は控えるべき？メモリ解放しないよ。 - それマグで！&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>2007-05-09 19:03:28</published>
  <title>phpでバッチ処理は控えるべき？メモリ解放しないよ。</title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/20070509/1178705008</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
