<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>patorash</author_name>
  <author_url>https://blog.hatena.ne.jp/patorash/</author_url>
  <blog_title>リゾームのテックブログ</blog_title>
  <blog_url>https://tech.rhizome-e.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>株式会社リゾーム システム企画・開発部 第4グループの尾古（@patorash）です。 弊社で扱っているシステムで、複数のgzip圧縮したファイルを読み込んでDBにインポートする処理がありました。今回はそれのリファクタリングを行い、10%ほど速度改善した話です。 リファクタリング前の処理 リファクタリング前は、ファイルの内容を読み込んで変数に入れた後、インポート処理を行っていました。そのインポート処理においても、巨大文字列を1行ずつ読み込んで処理するようにしてありました。 file_path = Rails.root.join('files', 'import_file.jsonl.gz') …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.rhizome-e.com%2Fentry%2F2022%2F06%2F03%2F142906&quot; title=&quot;ファイルを読み込んで長い文字列を処理する方式からIOオブジェクトで処理する方式に変えたら10%高速化した話 - リゾームのテックブログ&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>2022-06-03 14:29:06</published>
  <title>ファイルを読み込んで長い文字列を処理する方式からIOオブジェクトで処理する方式に変えたら10%高速化した話</title>
  <type>rich</type>
  <url>https://tech.rhizome-e.com/entry/2022/06/03/142906</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
