Skip to content

How to reduce require time #14

Closed Answered by HoneyryderChuck
forthrin asked this question in Q&A
Discussion options

You must be logged in to vote

I think you're comparing apples to oranges. Most of the examples are from bundled/standard gems; if you know how require works, it should be obvious why they're so fast. Also, a lot of gems are known for lazy loading code (and nokogiri is mostly a C extension, not a lot of ruby code to read/parse/evaluate).

If you want to make a fair comparison, you should put it against other http clients. and repeat your example a few times to take caches into account. And you'll see that, while there's substantial room for improvement in httpx, it's not that critical.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by HoneyryderChuck
Comment options

You must be logged in to vote
1 reply
@HoneyryderChuck
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants