Help with performance (file io)

With String.rstrip(line) |> String.split(","), you are ripping through the line multiple times. Try using the trim: option instead:

  defp process_line(line) do
    line
    |> String.split(",", trim: true)
  end