You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HyREPL calls hy_compile on every processed command. When that happens, a HyASTCompiler is constructed and all the stdlib imports are triggered again and again.
We should probably create and reuse a single HyASTCompiler instance for the lifetime of HyREPL, no?
These changes make `HyREPL` use a single `HyASTCompiler` instance, instead of
creating one every time a valid source string is processed.
This change avoids the unnecessary re-initiation of the standard library
`import` and `require` steps that currently occur within the module tracked by a
`HyREPL` instance.
Also, one can now pass an existing compiler instance to `hy_repl` and
`hy_compiler`.
Closeshylang#1698.
HyREPL
callshy_compile
on every processed command. When that happens, aHyASTCompiler
is constructed and all the stdlib imports are triggered again and again.We should probably create and reuse a single
HyASTCompiler
instance for the lifetime ofHyREPL
, no?Originally posted by @brandonwillard in https://github.com/hylang/hy/issue_comments#issuecomment-437527370
The text was updated successfully, but these errors were encountered: