Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
How to Make Ruby CGI Script Faster - CGIを高速化する小手先テクニック -
1. Nagoya RubyKaigi 02
How to Make
Ruby CGI Script Faster
CGI
makoto kuwata
http://www.kuwata-lab.com/
2. What I'll talk and not
I talk about I don't talk about
Why CGI is so slow? Scale out
How to improve your Database
code?
Key Value Store
Or other kool topics
5. Benchmark
Process Invocation require 'cgi'
cgi = CGI.new render HTML
1.80%
0.87%
39.55%
57.78%
Mac OS X 10.6
Ruby 1.8.7-p334
Core2 Duo 2GHz
https://gist.github.com/850390
6. Why CGI is so slow?
FACT
Process invocation is slow
TRUTH
Library loading is much slow
7. Benchmark of 'require'
(none) 6.15 1.8.7-p334
erb 9.26
time 15.9 Library loading
uri 16.15 is much slower
fileutils 17.26 than process
cgi 17.31 invocation
tmpdir 17.84
(
pstore 19.19
date2 19.4 )
openssl 21.92
tempfile 22.53
cgi/session 30.18
yaml 32.27
rexml/document 40.96
0 10 20 30 40 50 (ms)
https://gist.github.com/850386