oga/task
Yorick Peterse 2689d3f65a Initial setup using a C extension.
While I've tried to keep Oga pure Ruby for as long as possible the performance
of Ragel's Ruby output was not worth the trouble. For example, lexing 10MB of
XML would take 5 to 6 seconds at least. Nokogiri on the other hand can parse
that same XML into a DOM document in about 300 miliseconds. Such a big
performance difference is not acceptable.

To work around this the XML/HTML lexer will be implemented in C for
MRI/Rubinius and Java for JRuby. For now there's only a C extension as I
haven't read up yet on the JRuby API. The end goal is to provide some sort of
Ragel "template" that can be used to generate the corresponding C/Java
extension code. This would remove the need of duplicating the grammar and
associated code.

The native extension setup is a hybrid between native and Ruby. The raw Ragel
stuff happens in C/Java while the actual logic of actions happens in Ruby. This
adds a small amount of overhead but makes it much easier to maintain the lexer.
Even with this extra overhead the performance is much better than pure Ruby.
The 10MB of XML mentioned above is lexed in about 600 miliseconds. In other
words, it's 10 times faster.
2014-05-05 00:31:28 +02:00
..
build.rake Basic project layout. 2014-02-26 19:50:16 +01:00
checksum.rake Basic project layout. 2014-02-26 19:50:16 +01:00
coverage.rake Rake task for generating code coverage. 2014-03-28 16:33:47 +01:00
fixtures.rake Track the XML fixture in Git. 2014-04-19 01:03:14 +02:00
generate.rake Removed the `regenerate` task. 2014-04-19 00:59:09 +02:00
lexer.rake Initial setup using a C extension. 2014-05-05 00:31:28 +02:00
manifest.rake Generate files before generting the manifest. 2014-04-29 20:41:02 +02:00
parser.rake Renamed HTML_PARSER to PARSER_OUTPUT. 2014-03-25 09:35:48 +01:00
tag.rake Basic project layout. 2014-02-26 19:50:16 +01:00
test.rake Initial setup using a C extension. 2014-05-05 00:31:28 +02:00