Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a DESCRIPTION section

  • Loading branch information...
commit 010d5c6570ddc3011c7d450c24101ef7d802a4d6 1 parent 1d1eda9
@avar avar authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 lib/App/QuoteCC.pm
View
19 lib/App/QuoteCC.pm
@@ -146,6 +146,25 @@ Emit quotes to interactive shells on login, in F</etc/profile>:
failo-wisdom
fi
+=head1 DESCRIPTION
+
+I wrote this program because using L<fortune(1)> and Perl in
+F</etc/profile> to emit a random quote on login was too slow. On my
+system L<fortune(1)> can take ~100 ms from a cold start, although
+subsequent invocations when it's in cache are ~10-20 ms.
+
+Similarly using Perl is also slow, this is in the 80 ms range:
+
+ perl -COEL -MYAML::XS=LoadFile -E'@q = @{ LoadFile("/path/to/quotes.yml") }; @q && say $q[rand @q]'
+
+Either way, when you have a 40 ms ping time to the remote machine
+showing that quote is the major noticeable delay when you do I<ssh
+machine>.
+
+L<quotecc> solves that problem, showing a quote takes around 4 ms
+now. That's comparable with any hello wold program in C that I
+produce.
+
=head1 AUTHOR
E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org>
Please sign in to comment.
Something went wrong with that request. Please try again.