Hey,
Why the dependency on UglifyJS? It's a build-minification tool. Wouldn't a plain eval be sufficient as you already do after piping everything through Uglify? Especially given that the default is to not compress the code. It would definitely be faster without involving Uglify, which I've got a feeling is to blame for the 300ms+ time spent compiling a single schema. ;-)
If people wish to compress the code as they see fit, dependency injection (a.k.a pass a function in) would be a decent solution.
Hey,
Why the dependency on UglifyJS? It's a build-minification tool. Wouldn't a plain
evalbe sufficient as you already do after piping everything through Uglify? Especially given that the default is to not compress the code. It would definitely be faster without involving Uglify, which I've got a feeling is to blame for the 300ms+ time spent compiling a single schema. ;-)If people wish to compress the code as they see fit, dependency injection (a.k.a pass a function in) would be a decent solution.