forked from jeremyevans/sequel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor serialization_modification_detection to increase performance
The previous handling was correct, but not performant, as it did a serialize/deserialize pair both for new objects and after saving. Change the code to just clear the original values after saving (which fixes saved objects), and just serialize early for new objects (which fixes new objects). To make this either, add a private serialize_deserialized_values instance method to the serialization plugin, so that the modification detection plugin can use it. While here, update the RDoc for the modification detection plugin.
- Loading branch information
1 parent
e16f1d3
commit 1cce888
Showing
2 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters