elixir icon indicating copy to clipboard operation
elixir copied to clipboard

IO.gets/1 slowly expands expressions

Open antedeguemon opened this issue 3 years ago • 0 comments

Elixir and Erlang/OTP versions

Erlang/OTP 25 [erts-13.0.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]

IEx 1.13.4 (compiled with Erlang/OTP 25)

Operating system

MacOS Monterey 12.6

Current behavior

Hey folks! I am not really sure if this is a bug - since expression expansion may be an undocumented feature for IO.gets/1. Regardless, the expansion still takes way longer than the regular expansion from iex (outside of IO.gets/1).

  1. Start fetching a line from stdin using IO.gets("prefix: ")
  2. Input some keys and press tab
  3. Stdin input will freeze and return the possible expression expansions after some good seconds

asciicast

Expected behavior

I expected IO.gets/1 to not expand expressions when I press tab.

If expansion is a feature, I think it would be good to have it run as fast as the default expansion in IEX if possible.

antedeguemon avatar Oct 12 '22 14:10 antedeguemon