Open lancejpollard opened 10 years ago
Oh interesting, so basically requiring the minimum number of modules up front before logging? i'm +1 to that idea.
Awesome, yep that's it pretty much.
+1
i'de like to keep requires up top, but wow 500ms
is a lot, here are the slowest modules that we load.
removing / using alternatives should speed things up.
yah, let's get rid of pretty-error.. doesn't work on light terminals anyway.
I think we need to go back and figure this one out, loading duo is too slow right now.
@yields what program did you use to analyze require load time?
From lib/duo.js
:
ah cool, thanks @kevva. wow that's ridiculous. I think duo-package (with request) is the culprit, but it seems like it's not getting cached, maybe it's loading 2 separate duo-package versions.
I've started to just requiring request on demand whenever I use it. So huge. Seems to speed up duo-package by ~400ms.
Just logged before and after the require statements in
bin/_duo
and it takes a while for those things to load up, maybe 100-500ms, so it takes a half a second or more to execute the command.Ideally it would immediately execute the command and give you feedback similar to how component does it now :)