-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to runtime initialization #201
Conversation
1. Do not use nouse_stdio as it causes slowdowns when IEx is also running 2. Reduce the amount of generated random atoms by using the child_node as the name of the parent process 3. Do not pass quoted strings to Windows to eval, use argv instead Closes #194.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting issue, great you figured it out :D @juhalehtonen thanks a lot for helping with that ❤️
@jonatanklosko we also had to remove newlines from the evaluated code. If we need to change this code, we should consider writing to a file and asking Elixir to evaluate the file instead. We could even ship this file in priv inside livebook, especially because I rewrote it to receive arguments from System.argv, so it no longer differs per node. |
💚 💙 💜 💛 ❤️ |
|
||
if @child_node_eval_string =~ "\n" do | ||
raise "invalid @child_node_eval_string, newline found: #{inspect(@child_node_eval_string)}" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be cleaner to String.replace("\n", ";")
on the formatted code instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't have two ;
in a row. So if you have two newlines, it would fail. We could handle all of these cases, squeeze, and so on but I preferred to write the abomination above for now.
Do not use nouse_stdio as it causes slowdowns when IEx
is also running
Reduce the amount of generated random atoms by using the
child_node as the name of the parent process
Do not pass quoted strings to Windows to eval, use argv
instead
Closes #194.