Skip to content

Using some String functions adds 16.9MB to output #353

Description

@jclem

I am trying to compile the OT.Text module from https://github.com/jclem/ot_ex and am finding that even if I try to compile only the rather small OT.Text.Component module, the presence of String.slice/3 adds 16.9MB to the JavaScript output.

I have also found that the presence of String.split_at/2 adds the same amount. Simply commenting out the lines that include either String.slice/3 or String.split_at/2 reduces my output from 18MB to 1.1MB.

In order to check that I wasn't doing something wrong, I attempted to compile just this module:

defmodule Test do
  def split_abc do
    String.split_at("ABC", 2)
  end
end

Its output is also 18MB. What's causing this very large compilation size, and can it be fixed? This is with ElixirScript v0.30.0

btw I forgot to say, thanks for spending your time on ElixirScript, I'm super super super excited about it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions