Force ::Collation objects to be serialized en bloc, "fixing" GC. deletion
authorMatt S Trout <mst@shadowcat.co.uk>
Mon, 9 Sep 2013 23:53:19 +0000 (23:53 +0000)
committerMatt S Trout <mst@shadowcat.co.uk>
Mon, 9 Sep 2013 23:58:22 +0000 (23:58 +0000)
commit8e9c4d7be791f99add6e4522a0de7c96e73e95be
treed5fd2a51b5ec812cbc814876628327a7095120c7
parent498cec1bec4c9cfd15d090aac95c356a90f3f07b
Force ::Collation objects to be serialized en bloc, "fixing" GC.

By using the Text::Tradition::TypeMap::Entry for Text::Tradition::Collation,
KiokuDB is forced to turn the entire collation into a single YAML blob, which
provided none of the collation's sub-objects are shared between collations,
is probably going to be faster.

Also, because it appears that GC is mistakenly eating the ::Collation's
sub-objects rather than the collation itself, this appears to make the GC
code do the right thing. I've added an extra test to ensure that the reading
keys remain the same, which is hopefully sufficient to imply that the
sub-objects have been restored appropriately.
lib/Text/Tradition/Directory.pm
t/text_tradition_directory.t