-
Notifications
You must be signed in to change notification settings - Fork 4
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
basilisp.core/load
fn caching
#878
Comments
Namespaces are cached by the Basilisp import mechanism (which is supported and facilitated by Python's own But setting aside the technical aspects, I simply don't agree with this style of code organization and do not wish to encourage it. The same effect could be achieved by splitting a namespace into a sub-namespaces with implementation details and then requiring those into the "main"/public API namespace. This style of organization would be eligible for namespace caching, while the I've not done a comprehensive survey of Clojure libraries, but from my recollection this is not a common idiom outside of Clojure ( |
Right.
In the case of We can discuss the best course of action once I commit the initial draft, another option would be to concatenate all files into one, but that defeats the purpose of modularity.
I haven't seen any other such case either. Thanks |
Hi,
as per its docstring,
basilisp.core/load
ed files are not cached and will be reread every-time they are loaded:I believe this can cause degraded performance, since every time a library is loaded that uses
load
to separate files under one namespace it has to read, analyze and compile those files.Is there a chance this limitation been lifted? I think this will get it closer to how Clojure works.
Thanks
The text was updated successfully, but these errors were encountered: