A question regarding best practices with an eye towards performance. I'm using SCI from clj and cljs (potentially during render). Not doing anything crazy at the moment – just eval'ing user-provided pure functions.
1. How costly is passing Clojure vars into SCI? Does it scale with size of the data?
2. When wanting to expose entire namespaces to SCI, I'm guessing doing this ahead-of-time (rather than on every eval call) is possible through create-ns?
Any other tips welcome. Thanks!
@mithrandir03 The amount of vars has nothing to do with performance I think.
You can copy an entire namespace using sci/copy-ns .
Documented here: https://github.com/babashka/sci?tab=readme-ov-file#copy-a-namespace
Thanks! I didn't mean the amount of vars, but the size of data they hold. E.g. passing in a map with thousands of entries.
why should that matter?
I don't know. Don't really know how SCI works 🙂