Taking Textile Out
The Plot Thickens – following up on my response to Ryan, I ran a series of cheap-thrills performance tests using apache bench on the Quixote app and Instiki, with display-time Textile reformatting both enabled and disabled.
To disable Textile I modified app/models/chunk/engines.rb to return
content rather than
RedCloth.new(text,content.options[:engine_opts]).to_html.
Scenario Requests per second
-------------------------------------------
Textile Engine
Disabled Enabled
------------------
Instiki, no content 21.05 17.75
Quixote, no content 250.63 149.37
Instiki, content 9.66 9.57
Quixote, content 248.14 18.67
I wasn’t able to get Instiki to churn out more than 22 pages per second across a number of test runs. The machine I’m running this on is a 2.4GHz, 1MB RAM 7400 RPM EIDE drives that also happens to be running X and gosh knows what else, but at least its running all this at the same time for both sets of tests.
I’m not surprised to see the big hit from Textile coming through in the Quixote numbers. A while back I did some raw text processing benchmarks comparing Textile, Markdown and reStructuredText and discovered that if Markdown was suitable for the task, it could be rendered at access time and a site might still survive a slashdotting. For example, using the same content and scenario as above, except modifying the content slightly to use Markdown ‘markup’:
Markdown Engine
------------------
Quixote, no content 215.98
Quixote, content 106.60
Pretty useful! Of course Markdown isn’t for everyone or every purpose but if one faces a toss up over which to use, Markdown’s simplicity leading to raw output performance may win hearts.
But Textile vs Markdown was not what this song is about, its about Alice. Remember Alice? Oops… I mean, the purpose of digging out ab was for a quick comparison of frameworks which failed to account for rendering and then led to one thing and then another and now accounts for formatting and… still… I am puzzled.
I’m puzzled as to the stark difference in raw performance between Ruby/Instiki and Python/Quixote when taking Textile out of the picture. Either I’ve missed something in Ruby/Instiki (entirely possible, although the content certainly is not being rendered formatted!) or there is some deep juju at work, or not at work as the case may be.