NAME
Starch::Plugin::Sereal - Use Sereal for cloning and diffing Starch data structures.
SYNOPSIS
my $starch = Starch->new(
plugins => ['::Sereal'],
);
DESCRIPTION
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.
MANAGER ATTRIBUTES
These attributes are added to the Starch::Manager class.
sereal_encoder
An instance of Sereal::Encoder.
sereal_decoder
An instance of Sereal::Decoder.
canonical_sereal_encoder
An instance of Sereal::Encoder with the canonical
option set.
MODIFIED MANAGER METHODS
These methods are added to the Starch::Manager class.
clone_data
Modified to use "sereal_encoder" and "sereal_decoder" to clone a data structure.
is_data_diff
Modified to use "canonical_sereal_encoder" to encode the two data structures.
SUPPORT
Please submit bugs and feature requests to the Starch-Plugin-Sereal GitHub issue tracker:
https://github.com/bluefeet/Starch-Plugin-Sereal/issues
AUTHORS
Aran Clary Deltac <bluefeet@gmail.com>
ACKNOWLEDGEMENTS
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.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.