Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-10706

Session.save() should check first if there are pending changes

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.60.0
    • None
    • jcr
    • None

    Description

      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.

      if (session.hasPendingChanges()) {
        session.save();
      }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            joerghoh Joerg Hoh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: