New socket server startup proactively loads too much code, slowing boot time

Description

In the new socket server code, clojure.core.server is proactively loaded (regardless of whether servers are in the config), which will also load clojure.edn and clojure.string.

Approach: Delay loading of this code until the first server config is found. This improves startup time when not using the socket server about 0.05 s.

Patch: clj-1891.patch

Environment

None

Activity

Show:
Alexander Yakushev
January 2, 2018, 3:17 PM

Bump. With the introduction of Spec, and considering the fact that clojure.core.server triggers the initialization of Spec, the benefit of solving this issue should now be bigger than 0.05 sec (more like 0.2 sec). See http://clojure-goes-fast.com/blog/clojures-slow-start .

Assignee

Unassigned

Reporter

Alex Miller

Labels

Approval

Vetted

Patch

Code

Affects versions

Priority

Major