Closed borkdude closed 4 years ago
Some more ideas here: https://github.com/babashka/babashka.pods/issues/14
Since it's not clear if any of these ideas really significantly speed up things, I'll close this for now, but at least we have it documented somewhere.
Thanks for going through all this experimentation
Yes, updated in babashka/babashka.pods#14. It turns out there are significant gains to be made if we split things up per namespace on demand. It's just that with the example I was initially using, it still used the client side heavy namespaces, that's why I didn't see much difference there, since that's where the most time went. When only using markdown for example, things are much faster when splitting things up per namespace.
I have implemented a new pod operation to optimize startup time when only some namespaces are used. PR coming.
load time on linux slashed from 122 msecs to 18 msecs! Thanks heaps! :partying_face:
It currenly takes around 120ms on my Macbook Pro 2019 to
load-pod
bootleg. Which is pretty good, but maybe there are some ways to improve on it.These are some possible optimizations:
print
+flush
to write it to stdout.The above two strategies only seemed to help a little bit.
Maybe we could defer loading of pod namespace code to the
require
of that namespace. This would work for sci, but not for Clojure. Maybe that's an OK trade-off to make, since Clojure startup is usually around 1.5 or more anyway?