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.
isa_entries => {
"Text::Tradition" =>
KiokuDB::TypeMap::Entry::Naive->new(),
+ "Text::Tradition::Collation" => Text::Tradition::TypeMap::Entry->new(),
"Graph" => Text::Tradition::TypeMap::Entry->new(),
- "Graph::AdjacencyMap" => Text::Tradition::TypeMap::Entry->new(),
}
);
},
my @w1 = sort { $a->sigil cmp $b->sigil } $ntobj->witnesses;
my @w2 = sort{ $a->sigil cmp $b->sigil } $nt->witnesses;
is_deeply( \@w1, \@w2, "Looked up remaining tradition by name" );
+
+ is_deeply(
+ [ sort keys %{$nt->collation->{readings}} ],
+ [ sort keys %{$ntobj->collation->{readings}} ],
+ 'Same reading keys between original and re-look-up'
+ );
}
my %final_counts = get_counts();