Re: NodeBuilder#setProperty using the same value

2013-06-06 Thread Michael Dürig



On 5.6.13 13:43, Jukka Zitting wrote:

Hi,

On Wed, Jun 5, 2013 at 3:32 PM, Alex Parvulescu
 wrote:

I'm wondering if we could turn the NodeBuilder#setProperty into a noop when
setting the same value on a property.


I don't see any bigger issues with this, though it would be nice to
have a benchmark that verifies that the added complexity (though small
in this case) is worth it.


Upfront equality check on all such calls might end up being more 
expensive then allowing a property to be set to its own value once in a 
while.


Michael


Re: Some more benchmarks

2013-06-06 Thread Jukka Zitting
Hi,

On Fri, May 31, 2013 at 3:14 PM, Jukka Zitting  wrote:
> It looks like we have a performance regression in ReadPropertyTest.
> Quick profiling shows a lot of the time seems to be going to
> MemoryNodeBuilder$ConnectedHead.update(), which is weird since we're
> only reading and thus the related MNB head should be unconnected. I'll
> investigate.

Revision 1490258 fixed the issue. The updated results are:

Apache Jackrabbit Oak 0.9-SNAPSHOT
# ReadPropertyTest   min 10% 50% 90% max   N
Jackrabbit40  41  41  42  971448
Oak-Default   11  12  12  14  194804
Oak-Mongo 17  18  18  20 1233128
Oak-Segment   94  94  96  98 136 622
Oak-Tar   11  11  12  13  175121

BR,

Jukka Zitting


Re: svn commit: r1490258 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java

2013-06-06 Thread Michael Dürig



On 6.6.13 13:41, ju...@apache.org wrote:

Author: jukka
Date: Thu Jun  6 12:41:28 2013
New Revision: 1490258

URL: http://svn.apache.org/r1490258
Log:
OAK-781: Clarify / fix effects of MISSING_NODE as base state of NodeBuilder

Fix the performance issue of a ConnectedHead never actually updating
the head state after a rebase. It would just repeatedly create new
UnconnectedHead instances without ever setting the head field. This
commit makes updating the head field the responsibility of the head()
method, which by centralizing the state transition should help avoid
potential other similar issues.


Thanks for finding this. Looks better now.


Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java?rev=1490258&r1=1490257&r2=1490258&view=diff
==
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
 Thu Jun  6 12:41:28 2013
@@ -142,7 +142,11 @@ public class MemoryNodeBuilder implement
   * @return  head of this builder
   */
  private Head head() {
-return head.update();
+Head newHead = head.update();
+if (newHead != head) {
+head = newHead;
+}
+return newHead;
  }


Isn't this the same as

return head = head.update()

??

Michael


Re: svn commit: r1490258 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java

2013-06-06 Thread Jukka Zitting
Hi,

On Thu, Jun 6, 2013 at 4:01 PM, Michael Dürig  wrote:
> On 6.6.13 13:41, ju...@apache.org wrote:
>>   private Head head() {
>> -return head.update();
>> +Head newHead = head.update();
>> +if (newHead != head) {
>> +head = newHead;
>> +}
>> +return newHead;
>>   }
>
> Isn't this the same as
>
> return head = head.update()

It is, except for the nice side-effect of being able to easily set a
breakpoint on state transitions.

BR,

Jukka Zitting


jackrabbit-oak build #1700: Broken

2013-06-06 Thread Travis CI
Build Update for apache/jackrabbit-oak
-

Build: #1700
Status: Broken

Duration: 1150 seconds
Commit: fa27d3c33ea57a8f3b34bceb12937b8b6a28ce3b (trunk)
Author: Thomas Mueller
Message: OAK-13 Use a daemon thread to avoid blocking the build.

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1490266 
13f79535-47bb-0310-9956-ffa450edef68

View the changeset: 
https://github.com/apache/jackrabbit-oak/compare/09d79d819670...fa27d3c33ea5

View the full build log and details: 
https://travis-ci.org/apache/jackrabbit-oak/builds/7840285

--
sent by Jukka's Travis notification gateway


jackrabbit-oak build #1702: Broken

2013-06-06 Thread Travis CI
Build Update for apache/jackrabbit-oak
-

Build: #1702
Status: Broken

Duration: 669 seconds
Commit: fb96bd6b92e3f3fff91bc9fb92cc5987d2715e96 (trunk)
Author: Jukka Zitting
Message: OAK-641: Improved benchmark tooling

Better formatting of hprof analysis reports

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1490352 
13f79535-47bb-0310-9956-ffa450edef68

View the changeset: 
https://github.com/apache/jackrabbit-oak/compare/e5c15e87e81a...fb96bd6b92e3

View the full build log and details: 
https://travis-ci.org/apache/jackrabbit-oak/builds/7847527

--
sent by Jukka's Travis notification gateway


jackrabbit-oak build #1703: Fixed

2013-06-06 Thread Travis CI
Build Update for apache/jackrabbit-oak
-

Build: #1703
Status: Fixed

Duration: 1602 seconds
Commit: 924baad7277f7fc75c699d98f4d17f0586655cfc (trunk)
Author: Jukka Zitting
Message: OAK-799: Fail-fast for content diffs

Streamline EditorDiff to reduce the number of stack frames in profiler reports

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1490361 
13f79535-47bb-0310-9956-ffa450edef68

View the changeset: 
https://github.com/apache/jackrabbit-oak/compare/fb96bd6b92e3...924baad7277f

View the full build log and details: 
https://travis-ci.org/apache/jackrabbit-oak/builds/7848103

--
sent by Jukka's Travis notification gateway