Use precompiled Parse::RecDescent parsers for moar speed
authorPeter Rabbitson <ribasushi@cpan.org>
Mon, 16 Jan 2012 10:12:32 +0000 (11:12 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Tue, 17 Jan 2012 10:14:18 +0000 (11:14 +0100)
commitbdf60588bb1e35e284bdc02c43d0ffe691994465
tree4288699c5c2b86a17f6b6a112ca460b26a2978e0
parent88ad825597d4eee0bf3c93aa81738f82cc583fae
Use precompiled Parse::RecDescent parsers for moar speed

Leverage the (hideous but effective) capability of Parse::RecDescent to
precompile concise gramars into multithousand line monsters. Improves
parsing and thus diffing speed considerably, i.e.:

Testing before:
Files=66, Tests=1851, 23 wallclock secs ( 0.38 usr  0.06 sys + 19.96 cusr  1.80 csys = 22.20 CPU)

Testing after:
Files=66, Tests=1858, 17 wallclock secs ( 0.38 usr  0.08 sys + 15.50 cusr  0.74 csys = 16.70 CPU)

A number of cleanups, including grammar fixes when transitioning from
q{} to heredocs. No functional changes at all.
18 files changed:
.gitignore
Changes
Makefile.PL
lib/SQL/Translator/Parser/Access.pm
lib/SQL/Translator/Parser/DB2.pm
lib/SQL/Translator/Parser/DB2/Grammar.pm [deleted file]
lib/SQL/Translator/Parser/MySQL.pm
lib/SQL/Translator/Parser/Oracle.pm
lib/SQL/Translator/Parser/PostgreSQL.pm
lib/SQL/Translator/Parser/SQLServer.pm
lib/SQL/Translator/Parser/SQLite.pm
lib/SQL/Translator/Parser/Storable.pm
lib/SQL/Translator/Parser/Sybase.pm
lib/SQL/Translator/Utils.pm
share/Grammar/DB2.gra [deleted file]
share/PrecompiledParsers/Parse/RecDescent/DDL/SQLT/README [new file with mode: 0644]
t/02mysql-parser.t
t/60roundtrip.t