It all depends on the context, but Mojo::UserAgent has a lot of dependencies and takes an age to load compared to HTTP::Tiny.
The following table shows time in seconds to execute Mojo::UserAgent->new() / HTTP::Tiny->new().
| Mojo::UserAgent | HTTP::Tiny |
0.000] Mojo::UserAgent 0.000] Mojo::Base 0.001] utf8 0.002] feature 0.004] mro 0.006] Carp 0.007] overloading 0.010] Scalar::Util 0.010] List::Util 0.012] constant 0.013] warnings::register 0.014] Role::Tiny 0.018] Future::AsyncAwait 0.019] Mojo::Util 0.020] Data::Dumper 0.025] bytes 0.027] Digest::MD5 0.028] Digest::base 0.030] Digest::SHA 0.031] vars 0.032] Fcntl 0.033] integer 0.036] Encode 0.038] Encode::Alias 0.041] Encode::MIME::Name 0.042] Storable 0.043] Log::Agent 0.047] parent 0.048] Encode::Encoding 0.049] Encode::Config 0.050] Encode::ConfigLocal 0.051] File::Basename 0.053] Getopt::Long 0.061] overload 0.063] IO::Compress::Gzip 0.063] IO::Compress::RawDeflate 0.064] IO::Compress::Base 0.065] IO::Compress::Base::Common 0.066] File::GlobMapper 0.066] File::Glob 0.073] IO::File 0.074] Symbol 0.075] SelectSaver 0.076] IO::Seekable 0.076] IO::Handle 0.077] IO 0.083] IO::Compress::Adapter::Deflate 0.084] Compress::Raw::Zlib 0.090] IO::Compress::Gzip::Constants 0.091] IO::Compress::Zlib::Extra 0.094] IO::Poll 0.094] IO::Uncompress::Gunzip 0.095] IO::Uncompress::RawInflate 0.096] IO::Uncompress::Base 0.101] IO::Uncompress::Adapter::Inflate 0.104] MIME::Base64 0.106] Pod::Usage 0.107] Config 0.108] File::Spec 0.108] File::Spec::Unix 0.109] Cwd 0.115] Pod::Text 0.116] Pod::Simple 0.117] Pod::Escapes 0.118] Pod::Simple::LinkSection 0.119] Pod::Simple::BlackBox 0.121] if 0.140] Socket 0.143] Sub::Util 0.143] Unicode::Normalize 0.154] Mojo::EventEmitter 0.155] Mojo::IOLoop 0.155] Mojo::IOLoop::Client 0.156] Errno 0.157] IO::Socket::IP 0.157] base 0.158] IO::Socket 0.160] IO::Socket::INET 0.162] IO::Socket::UNIX 0.164] POSIX 0.168] Tie::Hash 0.175] Mojo::IOLoop::TLS 0.176] Mojo::File 0.177] File::Copy 0.179] File::Find 0.183] File::Path 0.186] File::Spec::Functions 0.187] File::stat 0.188] Class::Struct 0.191] File::Temp 0.195] Carp::Heavy 0.196] Mojo::Collection 0.197] re 0.201] Mojo::ByteStream 0.205] IO::Socket::SSL 0.206] Net::SSLeay 0.207] AutoLoader 0.216] IO::Socket::SSL::PublicSuffix 0.217] URI::_idna 0.217] URI::_punycode 0.223] Config_heavy.pl 0.225] Config_git.pl 0.248] Net::DNS::Native 0.248] IO::Socket::Socks 0.250] Mojo::IOLoop::Server 0.253] Mojo::IOLoop::Stream 0.254] Mojo::IOLoop::Subprocess 0.255] Mojo::JSON 0.256] JSON::PP 0.256] JSON::PP::Boolean 0.265] Cpanel::JSON::XS 0.269] attributes 0.274] Mojo::Promise 0.274] Mojo::Exception 0.279] Mojo::Reactor::Poll 0.280] Mojo::Reactor 0.281] Mojo::Loader 0.286] Mojo::Reactor::EV 0.286] EV 0.287] Mojo::UserAgent::CookieJar 0.288] Mojo::Cookie::Request 0.289] Mojo::Cookie 0.290] Mojo::Path 0.292] Mojo::UserAgent::Proxy 0.293] Mojo::URL 0.293] Mojo::Parameters 0.297] Mojo::UserAgent::Server 0.298] Mojo::Server::Daemon 0.298] Mojo::Server 0.300] Mojo::Transaction::WebSocket 0.300] Mojo::Transaction 0.301] Mojo::Message::Request 0.301] Mojo::Message 0.302] Mojo::Asset::Memory 0.302] Mojo::Asset 0.303] Mojo::Asset::File 0.304] Mojo::Content::Single 0.305] Mojo::Content 0.306] Mojo::Headers 0.310] Mojo::Content::MultiPart 0.312] Mojo::DOM 0.312] Mojo::DOM::CSS 0.315] Mojo::DOM::HTML 0.321] Mojo::JSON::Pointer 0.322] Mojo::Upload 0.326] Mojo::Message::Response 0.327] Mojo::Cookie::Response 0.327] Mojo::Date 0.328] Time::Local 0.332] Mojo::WebSocket 0.337] Mojo::UserAgent::Transactor 0.338] Mojo::Transaction::HTTP |
0.000] HTTP::Tiny 0.004] bytes 0.005] Errno 0.006] Config 0.007] IO::Socket 0.008] IO::Handle 0.009] Carp 0.011] overloading 0.014] Symbol 0.015] SelectSaver 0.016] IO 0.019] Socket 0.020] warnings::register 0.026] IO::Socket::INET 0.028] IO::Socket::UNIX 0.033] IO::Socket::IP 0.034] base 0.036] POSIX 0.037] Fcntl 0.043] Tie::Hash 0.045] constant |
In reply to Re: Mojo instead of curl
by 1nickt
in thread Mojo instead of curl
by leszekdubiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |