Thanks Alex! Agreed I don’t think there is any easy quick win aside from putting a conditional around the server section that’s controlled by an environment variable.
There might be some optimisations that could be done by front loading classes, similar to a prefetch in HTTP. Class loads from jars aren’t cheap once it’s in the JVM code cache it isn’t expensive though. In RT.load the getResource classfile and cljs is 38ms as an example. I was able to shave off startup time in cljbuck by packing all of the class loading together early. The extensive use of static initialisation could make this erroneous though. I started a branch that refactors the static methods and initialisation into instance methods of another class. It uses a singleton factory to maintain the behaviour of the RT ABI. With instances it would provide isolation which could enable deterministic parallel builds, better core test isolation, and possibly provide benefits to REPLs. The refer ticket in particular is interesting. Cheers, Nathan On Sat, 23 Dec 2017 at 11:23, Alex Miller <a...@d.com <a...@puredanger.com>> wrote: > Some related tickets: > > Server load (open) - https://dev.clojure.org/jira/browse/CLJ-1891 > > Spec load (closed but some more info) - > https://dev.clojure.org/jira/browse/CLJ-2108 > > refer perf (open) - https://dev.clojure.org/jira/browse/CLJ-1730 > > However, all of these are really just some easy one- time wins (can shave > about 0.2 s maybe) and don’t give you any qualitatively different > experience. > > For that something more is needed. If you are aot compiling, then > aot+direct linking+lazy vars (patch is on the page you linked as an > attachment) work together to load and run significantly less bytecode. If > not aot, then the additional costs are primarily in reading and compiling > (about 50/50) iirc. It’s unclear how to make those substantially faster. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- - sent from my mobile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.