thanks!
Adding changelog entry
Forgot to do that in #421
Merge pull request #422 from mamazu/patch-1
Adding changelog entry
Forgot to do that in #421
there should be no BC breaks, but it is a bigger change in the logic that i feel more comfortable as releasing with 2.0.0. consumers are expected to test new major versions more thoroughly than minor releases.
thanks a lot!
Taking advantage of batching property deletes when updating nodes (#421)
Currently the implementation for deleting a list of properties is to iterate over them and treat every delete of a property separately. This is a real determent to the performance of PHPCR, especially with bigger nodes.
Example: I want do delete three properties from the same node in the database. For every property we want to delete this is what it does:
Which in turn means if you want to delete two properties from the same node, then you have to query the database for the node twice and also parse the document twice.
Instead of defining the batch delete as a list of single deletes why not have the single delete make a batch delete with one element.
This pull request extracts out the logic for deleting a property from a node and extends it that you can delete a list of properties on one node as well.
To illustrate this with the same example: This would be the steps the program takes:
This massively reduces the amount of parsing the document and the amount of reads and writes to the database.
The new "batching functionality" first creates a map of properties and nodes to delete. Creating this map takes more memory than the brute force approach before.
Maybe we could also backport this speed up the 1.x branch so that project which are currently using the jackalope doctrine adapter also get the speed up.
looks good to me :+1:
can you please fix the remaining CS complaints and add an entry in the changelog for 2.0?
Furthermore: Should I rebase this PR to 1.x and then upmerge it? Because I think projects like sulu/sulu could really benefit from that right now.
is deleting several properties a pattern that comes up a lot in sulu? i would honestly prefer to have the change in the new major version, to favor stability over performance improvements - there is the off-chance that there is some side effect in this refactoring. and 2.0 should be released soon :tm: i already tagged the first beta release of jackalope/jackalope
released as https://github.com/liip/serializer/releases/tag/2.3.0
use latest versions of github actions
Merge pull request #34 from liip/update-github-actions
use latest versions of github actions
build on push to *.x branches
prepare release
added return type and changed required php version to minimum 8.0 (#33)
fix PHP 8 deprecation warnings
released as https://github.com/liip/serializer-jms-adapter/releases/tag/2.2.0