matthiasn / systems-toolbox

Tools and building blocks for building Systems in Clojure and ClojureScript
Eclipse Public License 1.0
174 stars 23 forks source link

Make switchboard's spec validation be configurable. #43

Closed kamituel closed 7 years ago

kamituel commented 7 years ago

I noticed that after the recent upgrade of systems-toolbox, a lot of time on the first load is being spent doing spec validation. It turns out switchboard has :validate-out and :validate-spec turned on (because it's the default setting for a component). It's currently not possible to override it, hence this PR.

We have a lot of components, as you know, and this costs us approx. 500 ms on the first load - and that is with code compiled in advanced mode.

matthiasn commented 7 years ago

Hey @kamituel, that's great to have this configurable. This will probably help us speed things up in another projects as well. Just one thought: when merging the opts, maybe it would make sense to change the order around so everything can be overridden, including the firehose stuff? Cheers

kamituel commented 7 years ago

Yeah, makes sense. I kind of intentionally did this in reverse as I didn't want to make it configurable just by accident, but I suppose no harm in that really.

matthiasn commented 7 years ago

Hey @kamituel, I merged and published it. Also took care care of the spec split in this release. Maybe I should have released that separately but I thought about that too late. But the changes required are also quite minimal and described in the CHANGELOG.

matthiasn commented 7 years ago

Updating the dependency then also requires the latest systems-toolbox-sente because of the changes in spec.