Starch::Plugin::Sereal - Use Sereal for cloning and diffing Starch data structures.
my $starch = Starch->new( plugins => ['::Sereal'], );
By default "clone_data" in Starch::State and "is_data_diff" in Starch::State use Storable to do the heavy lifting. This module replaces those two methods with ones that use Sereal which can be leaps and bounds faster than Storable.
In this author's testing is_data_diff will be about 3x faster with Sereal and clone_data will be about 1.5x faster with Sereal.
is_data_diff
clone_data
These attributes are added to the Starch::Manager class.
An instance of Sereal::Encoder.
An instance of Sereal::Decoder.
An instance of Sereal::Encoder with the canonical option set.
canonical
These methods are added to the Starch::Manager class.
Modified to use "sereal_encoder" and "sereal_decoder" to clone a data structure.
Modified to use "canonical_sereal_encoder" to encode the two data structures.
Please submit bugs and feature requests to the Starch-Plugin-Sereal GitHub issue tracker:
https://github.com/bluefeet/Starch-Plugin-Sereal/issues
Aran Clary Deltac <bluefeet@gmail.com>
Thanks to ZipRecruiter for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Starch::Plugin::Sereal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Starch::Plugin::Sereal
CPAN shell
perl -MCPAN -e shell install Starch::Plugin::Sereal
For more information on module installation, please visit the detailed CPAN module installation guide.