Joerg Hoh created OAK-10706:
-------------------------------
Summary: Session.save() should check first if there are pending
changes
Key: OAK-10706
URL: https://issues.apache.org/jira/browse/OAK-10706
Project: Jackrabbit Oak
Issue Type: Task
Components: jcr
Affects Versions: 1.60.0
Reporter: Joerg Hoh
Currently Session.save() works under the assumption that there are changes to
be committed. That means there is some static runtime overhead, even if no
changes are to be committed.
For that reason it's common to use this pattern to avoid this operation if
nothing is to be saved.
{noformat}
if (session.hasPendingChanges()) {
session.save();
}
{noformat}
But it would be really great if Oak would do this check internally, and avoid
the overhead if there's nothing to save at all.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)