Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New post on h2 maintenance release

  • Loading branch information...
commit 4b0c0536a99fa6844805a19403c06c5e2fa62d1b 1 parent 6b8196b
@skuro authored
View
145 2013/03/27/h2-support-for-alfresco-3-4-12-and-maven/index.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <title>SKURO! -- Shading lights</title>
+ <meta name="generator" content="skuro.tk/0.1 | jekyll/0.11.0" />
+ <meta charset="utf-8" />
+ <meta name="description" content="Personal Blog of Carlo Sciolla" />
+ <meta name="keywords" content="clojure,enlive,moustache,java,alfresco,lambdalf,performance" />
+ <link rel="stylesheet" href="/stylesheets/styles.css" />
+ <link rel="stylesheet" href="/stylesheets/pygment_trac.css" />
+ <link rel="stylesheet" href="/stylesheets/skuro.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+ <body>
+ <div class="adsense">
+ <script type="text/javascript"><!--
+ google_ad_client = "ca-pub-5536661153340295";
+ /* ghpages-skyscraper */
+ google_ad_slot = "1277668326";
+ google_ad_width = 120;
+ google_ad_height = 600;
+ //-->
+ </script>
+ <script type="text/javascript"
+ src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+ </script>
+ </div>
+ <div class="wrapper">
+ <header>
+ <span class="avatar">
+ <img src="http://www.gravatar.com/avatar/3246c43cf35485e40a18e72fa1fa7ace" />
+ </span>
+ <h1><a href="/">SKURO!</a></h1>
+ <ul>
+ <li><a href="/archive">Browse the <strong>Archive</strong></a></li>
+ <li><a href="/category">Browse by <strong>Categories</strong></a></li>
+ <li><a href="/about">Learn more <strong>About me</strong></a></li>
+ </ul>
+ <p class="persona">
+ <a href="https://github.com/skuro"><img src="/img/github.png" /></a>
+ <a href="http://nl.linkedin.com/in/carlosciolla"><img src="/img/linkedin.png" /></a>
+ <a href="https://twitter.com/skuro"><img src="/img/twitter.png" /></a>
+ <a href="/rss2.xml"><img src="/img/rss.png" /></a>
+ <span>shading lights</span>
+ </p>
+ </header>
+
+ <section>
+ <div class="post">
+ <h1>
+ H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">
+ <img src="/img/link.jpg" alt="Permalink to H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven" />
+ </a>
+</h1>
+<blockquote class="date-wrapper">
+ <h5 class="date">
+ March 27, 2013
+
+ &nbsp;
+
+ <a href="/category/alfresco">#alfresco</a><span>&nbsp;&nbsp;</span>
+
+ <a href="/category/h2support">#h2support</a><span>&nbsp;&nbsp;</span>
+
+ <a href="/category/maven">#maven</a><span>&nbsp;&nbsp;</span>
+
+ <a href="/category/sonatype">#sonatype</a><span>&nbsp;&nbsp;</span>
+
+
+ </h5>
+</blockquote>
+
+
+ <img src="/img/post/h2piechart_2.png" class="primary" />
+
+ <p>Just a quick update on the <a href="https://github.com/skuro/alfresco-h2-support">H2 support</a>
+project, today I released the <code>1.1.1</code> maintenance version which targets
+Alfresco v3.4.12 Enterprise.</p>
+
+<p>Please make sure you always double check the <a href="https://github.com/skuro/alfresco-h2-support/wiki/H2-Database-support-for-Alfresco">official documentation</a>
+to pick and choose the right version to use in your Alfresco project.</p>
+
+<h1>H2 and Maven</h1>
+
+<p>For <del>the sane</del> those among you that use the <a href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html">Maven SDK</a>,
+you should know that <code>H2 support</code> is used to quickly boot the Alfresco repository
+webapp during your development cycles.</p>
+
+<p>If you're using a version of Alfresco other than the default 4.x that's assumed
+by the SDK, you must also adapt your H2 support version to be able to start up
+Alfresco. It's as easy as overriding the following maven property:</p>
+
+<pre><code>&lt;h2-support.version&gt;1.1.1&lt;/h2-support.version&gt;
+</code></pre>
+
+<p>Happy development!</p>
+
+
+ <div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'skuro';
+// var disqus_id = '/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven';
+// var disqus_url = [location.protocol, '//', location.host, location.pathname].join('');
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+
+</div>
+
+ </section>
+
+ </div>
+ <footer>
+ <p><a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license"><img src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" style="border-width:0;margin-bottom:10px" alt="Creative Commons License" /></a> licensed under a Creative Commons <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">license</a>
+ <p><span rel="dct:type" property="dct:title" href="http://purl.org/dc/dcmitype/Text">SKURO! blog</span> by <a rel="cc:attributionURL" property="cc:attributionName" href="http://skuro.tk">Carlo Sciolla</a></p>
+ </footer>
+
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try{
+ var pageTracker = _gat._getTracker("UA-6754361-1");
+ pageTracker._trackPageview();
+ } catch(err) {}
+ </script>
+
+ </body>
+</html>
View
17 archive/index.html
@@ -56,6 +56,23 @@
<ul>
<li>
+ <span class="date">27 March 2013</span>
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</a>
+ <span class="categories">
+
+ <a class="tag" href="/category/alfresco">#alfresco</a>
+
+ <a class="tag" href="/category/h2support">#h2support</a>
+
+ <a class="tag" href="/category/maven">#maven</a>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a>
+
+ </span>
+</li>
+
+
+ <li>
<span class="date">11 March 2013</span>
<a href="/2013/03/11/java-stringbuilder-myth-now-with-content">Java StringBuilder myth debunked -- now with content!</a>
<span class="categories">
View
17 category/alfresco/index.html
@@ -236,6 +236,23 @@ <h1 class="title">
</li>
+ <li>
+ <span class="date">27 March 2013</span>
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</a>
+ <span class="categories">
+
+ <a class="tag" href="/category/alfresco">#alfresco</a>
+
+ <a class="tag" href="/category/h2support">#h2support</a>
+
+ <a class="tag" href="/category/maven">#maven</a>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a>
+
+ </span>
+</li>
+
+
</ul>
</div>
</div>
View
2  category/developer/clojure/feed
@@ -3,7 +3,7 @@
<title type="text" xml:lang="en">SKURO! -- Shading lights</title>
<link type="application/atom+xml" href="http://skuro.tk/rss2/" rel="self"/>
<link type="text" href="http://skuro.tk" rel="alternate"/>
- <updated>2013-03-11T23:43:59+01:00</updated>
+ <updated>2013-03-27T16:47:25+01:00</updated>
<id>http://skuro.tk</id>
<author>
<name>Carlo Sciolla</name>
View
17 category/h2support/index.html
@@ -74,6 +74,23 @@ <h1 class="title">
</li>
+ <li>
+ <span class="date">27 March 2013</span>
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</a>
+ <span class="categories">
+
+ <a class="tag" href="/category/alfresco">#alfresco</a>
+
+ <a class="tag" href="/category/h2support">#h2support</a>
+
+ <a class="tag" href="/category/maven">#maven</a>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a>
+
+ </span>
+</li>
+
+
</ul>
</div>
</div>
View
56 category/index.html
@@ -54,63 +54,63 @@
<h1>Categories</h1>
<div>
- <a class="tag" href="/category/amsterdam/" style="font-size:29px">#amsterdam</a>
-
- <a class="tag" href="/category/subversion/" style="font-size:23px">#subversion</a>
+ <a class="tag" href="/category/development/" style="font-size:29px">#development</a>
- <a class="tag" href="/category/alfresco/" style="font-size:59px">#alfresco</a>
+ <a class="tag" href="/category/alm/" style="font-size:53px">#alm</a>
- <a class="tag" href="/category/blog/" style="font-size:35px">#blog</a>
+ <a class="tag" href="/category/eclipse/" style="font-size:23px">#eclipse</a>
- <a class="tag" href="/category/slides/" style="font-size:23px">#slides</a>
+ <a class="tag" href="/category/java/" style="font-size:32px">#java</a>
- <a class="tag" href="/category/presentation/" style="font-size:23px">#presentation</a>
+ <a class="tag" href="/category/patterns/" style="font-size:23px">#patterns</a>
- <a class="tag" href="/category/maven/" style="font-size:32px">#maven</a>
+ <a class="tag" href="/category/spring/" style="font-size:23px">#spring</a>
- <a class="tag" href="/category/performance/" style="font-size:26px">#performance</a>
+ <a class="tag" href="/category/intellij/" style="font-size:23px">#intellij</a>
- <a class="tag" href="/category/emacs/" style="font-size:26px">#emacs</a>
+ <a class="tag" href="/category/alfresco/" style="font-size:62px">#alfresco</a>
- <a class="tag" href="/category/patterns/" style="font-size:23px">#patterns</a>
+ <a class="tag" href="/category/software/" style="font-size:23px">#software</a>
- <a class="tag" href="/category/intellij/" style="font-size:23px">#intellij</a>
+ <a class="tag" href="/category/h2support/" style="font-size:26px">#h2support</a>
- <a class="tag" href="/category/h2-support/" style="font-size:32px">#h2-support</a>
+ <a class="tag" href="/category/maven/" style="font-size:35px">#maven</a>
- <a class="tag" href="/category/italian/" style="font-size:26px">#italian</a>
+ <a class="tag" href="/category/meetup/" style="font-size:35px">#meetup</a>
- <a class="tag" href="/category/alm/" style="font-size:53px">#alm</a>
+ <a class="tag" href="/category/orgmode/" style="font-size:23px">#orgmode</a>
- <a class="tag" href="/category/apple/" style="font-size:32px">#apple</a>
+ <a class="tag" href="/category/amsterdam/" style="font-size:29px">#amsterdam</a>
- <a class="tag" href="/category/development/" style="font-size:29px">#development</a>
+ <a class="tag" href="/category/presentation/" style="font-size:23px">#presentation</a>
- <a class="tag" href="/category/jira/" style="font-size:23px">#jira</a>
+ <a class="tag" href="/category/emacs/" style="font-size:26px">#emacs</a>
<a class="tag" href="/category/windows/" style="font-size:23px">#windows</a>
- <a class="tag" href="/category/spring/" style="font-size:23px">#spring</a>
+ <a class="tag" href="/category/javascript/" style="font-size:26px">#javascript</a>
- <a class="tag" href="/category/software/" style="font-size:23px">#software</a>
+ <a class="tag" href="/category/subversion/" style="font-size:23px">#subversion</a>
- <a class="tag" href="/category/orgmode/" style="font-size:23px">#orgmode</a>
+ <a class="tag" href="/category/italian/" style="font-size:26px">#italian</a>
- <a class="tag" href="/category/sonatype/" style="font-size:26px">#sonatype</a>
+ <a class="tag" href="/category/clojure/" style="font-size:50px">#clojure</a>
- <a class="tag" href="/category/eclipse/" style="font-size:23px">#eclipse</a>
+ <a class="tag" href="/category/blog/" style="font-size:35px">#blog</a>
- <a class="tag" href="/category/clojure/" style="font-size:50px">#clojure</a>
+ <a class="tag" href="/category/slides/" style="font-size:23px">#slides</a>
- <a class="tag" href="/category/h2support/" style="font-size:23px">#h2support</a>
+ <a class="tag" href="/category/h2-support/" style="font-size:32px">#h2-support</a>
- <a class="tag" href="/category/javascript/" style="font-size:26px">#javascript</a>
+ <a class="tag" href="/category/apple/" style="font-size:32px">#apple</a>
<a class="tag" href="/category/linux/" style="font-size:38px">#linux</a>
- <a class="tag" href="/category/meetup/" style="font-size:35px">#meetup</a>
+ <a class="tag" href="/category/jira/" style="font-size:23px">#jira</a>
- <a class="tag" href="/category/java/" style="font-size:32px">#java</a>
+ <a class="tag" href="/category/performance/" style="font-size:26px">#performance</a>
+
+ <a class="tag" href="/category/sonatype/" style="font-size:29px">#sonatype</a>
</div>
</section>
View
17 category/maven/index.html
@@ -113,6 +113,23 @@ <h1 class="title">
</li>
+ <li>
+ <span class="date">27 March 2013</span>
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</a>
+ <span class="categories">
+
+ <a class="tag" href="/category/alfresco">#alfresco</a>
+
+ <a class="tag" href="/category/h2support">#h2support</a>
+
+ <a class="tag" href="/category/maven">#maven</a>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a>
+
+ </span>
+</li>
+
+
</ul>
</div>
</div>
View
17 category/sonatype/index.html
@@ -91,6 +91,23 @@ <h1 class="title">
</li>
+ <li>
+ <span class="date">27 March 2013</span>
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</a>
+ <span class="categories">
+
+ <a class="tag" href="/category/alfresco">#alfresco</a>
+
+ <a class="tag" href="/category/h2support">#h2support</a>
+
+ <a class="tag" href="/category/maven">#maven</a>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a>
+
+ </span>
+</li>
+
+
</ul>
</div>
</div>
View
BIN  img/post/h2piechart_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
186 index.html
@@ -10,7 +10,6 @@
<link rel="stylesheet" href="/stylesheets/pygment_trac.css" />
<link rel="stylesheet" href="/stylesheets/skuro.css" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
- <meta name="google-site-verification" content="XPlD7XrWzUh1Wb2pM1JB6AePZ3baqkD6srjyBirLAaE" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@@ -57,22 +56,24 @@
<!-- copied from post_header include -->
<h1>
- Java StringBuilder myth debunked -- now with content!
- <a href="/2013/03/11/java-stringbuilder-myth-now-with-content">
- <img src="/img/link.jpg" alt="Permalink to Java StringBuilder myth debunked -- now with content!" />
+ H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven
+ <a href="/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven">
+ <img src="/img/link.jpg" alt="Permalink to H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven" />
</a>
</h1>
<blockquote class="date-wrapper">
<h5 class="date">
- March 11, 2013
+ March 27, 2013
&nbsp;
- <a class="tag" href="/category/java">#java</a><span>&nbsp;&nbsp;</span>
+ <a class="tag" href="/category/alfresco">#alfresco</a><span>&nbsp;&nbsp;</span>
- <a class="tag" href="/category/performance">#performance</a><span>&nbsp;&nbsp;</span>
+ <a class="tag" href="/category/h2support">#h2support</a><span>&nbsp;&nbsp;</span>
- <a class="tag" href="/category/development">#development</a><span>&nbsp;&nbsp;</span>
+ <a class="tag" href="/category/maven">#maven</a><span>&nbsp;&nbsp;</span>
+
+ <a class="tag" href="/category/sonatype">#sonatype</a><span>&nbsp;&nbsp;</span>
</h5>
@@ -80,168 +81,29 @@ <h5 class="date">
<!-- end copy -->
- <img src="/img/post/joint.png" class="primary" />
+ <img src="/img/post/h2piechart_2.png" class="primary" />
- <h1>The myth</h1>
-
-<blockquote><p>Concatenating two Strings with the plus operator is the source of all evil</p>
-
-<p>-- Anonymous Java dev</p></blockquote>
-
-<p><em><strong>NOTE</strong>: The source code for the tests discussed here can be found on <a href="https://github.com/skuro/stringbuilder">Github</a></em></p>
-
-<p>It's from university time that I learned to regard <code>String</code> concatenation in Java
-using the '+' plus operator as a deadly performance sin. Recently there has been
-an internal review at <a href="http://www.backbase.com">Backbase R&amp;D</a> where such recurring
-mantra was dismissed as a myth due to <code>javac</code> using <code>StringBuilder</code> under the hood
-any time you use the plus operator to join Strings. I set myself up to prove
-such a point and verify the reality under different environments.</p>
-
-<h1>The test</h1>
-
-<p>Relying on your compiler to optimize your <code>String</code> concatenation means that things
-might change heavily depending on the JDK vendor you adopt. As far as platform
-support goes for my daily job, three main vendors should be considered:</p>
-
-<ul>
-<li>Oracle JDK</li>
-<li>IBM JDK</li>
-<li>ECJ -- for developers only</li>
-</ul>
-
-
-<p>Moreover, while we officially support Java 5 through 6, we are also looking into
-supporting Java 7 for our products, adding another three-folded level of indirection on top of
-the three vendors. For the sake of <del>lazyness</del> simplicity, the <code>ecj</code> compiled
-bytecode will be run with a single JDK, namely Oracle JDK7.</p>
-
-<p>I prepared a <a href="https://www.virtualbox.org/">Virtualbox</a> VM with all the above JDK
-installed, then I developed some classes to express three different concatenation
-methods, amounting to three to four concatenations per method invocaiton,
-depending on the specific test case.</p>
+ <p>Just a quick update on the <a href="https://github.com/skuro/alfresco-h2-support">H2 support</a>
+project, today I released the <code>1.1.1</code> maintenance version which targets
+Alfresco v3.4.12 Enterprise.</p>
-<p>The test classes are run a thousands times for each test round, with a total of
-100 rounds each test case. The same VM is used to run all the rounds for the same
-test case, and it's restarted across different test cases, all to let the Java
-runtime perform all the optimizations it can, without affecting the other test
-cases in any way. The default options were used to start all JVMs.</p>
+<p>Please make sure you always double check the <a href="https://github.com/skuro/alfresco-h2-support/wiki/H2-Database-support-for-Alfresco">official documentation</a>
+to pick and choose the right version to use in your Alfresco project.</p>
-<p>More details can be found in the benchmark runner <a href="https://github.com/skuro/stringbuilder/blob/master/bench.sh">script</a>.</p>
+<h1>H2 and Maven</h1>
-<h1>The code</h1>
+<p>For <del>the sane</del> those among you that use the <a href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html">Maven SDK</a>,
+you should know that <code>H2 support</code> is used to quickly boot the Alfresco repository
+webapp during your development cycles.</p>
-<p>Full code for both test cases and the test suite is available on <a href="https://github.com/skuro/stringbuilder">Github</a>.</p>
+<p>If you're using a version of Alfresco other than the default 4.x that's assumed
+by the SDK, you must also adapt your H2 support version to be able to start up
+Alfresco. It's as easy as overriding the following maven property:</p>
-<p>The following different test cases were produced to measure performance
-differences of the String concatenation with plus against the direct use of a
-<code>StringBuilder</code>:</p>
-
-<pre><code>// String concat with plus
-String result = "const1" + base;
-result = result + "const2";
-</code></pre>
-
-<hr />
-
-<pre><code>// String concat with a StringBuilder
-new StringBuilder()
- .append("const1")
- .append(base)
- .append("const2")
- .append(append)
- .toString();
-}
-</code></pre>
-
-<hr />
-
-<pre><code>//String concat with an initialized StringBuilder
-new StringBuilder("const1")
- .append(base)
- .append("const2")
- .append(append)
- .toString();
+<pre><code>&lt;h2-support.version&gt;1.1.1&lt;/h2-support.version&gt;
</code></pre>
-<p>The general idea is to provide a concatenation both at the head and at the tail
-of constant <code>String</code>s over a variable. The difference between the last two cases,
-both making explicit use of <code>StringBuilder</code>, is in the latter using the 1-arg
-constructor which initializes the builder with the initial part of the result.</p>
-
-<h1>The results</h1>
-
-<p>Enough talking, down below here you can have a look at the generated graphs, where
-each data point corresponds to a single test round (e.g. 1000 executions of the same
-test class).</p>
-
-<p>The discussion of the results and some more juicy details will follow.</p>
-
-<h2><img src="/img/post/catplus.png" title="Concatenation with plus" alt="Concatenation with plus" /></h2>
-
-<h2><img src="/img/post/catsb.png" title="Concatenation with StringBuilder" alt="Concatenation with StringBuilder" /></h2>
-
-<p><img src="/img/post/catsb2.png" title="Concatenation with initalized StringBuilder" alt="Concatenation with initialized StringBuilder" /></p>
-
-<h1>The discussion</h1>
-
-<p>Oracle JKD5 is the clear loser here, appearing to be in a B league when compared
-to the others. But that's not really the scope of this exercise, and thus we'll
-gloss over it for the time being.</p>
-
-<p>That said, there are two other interesting bits I observe in the above graph. The first is that indeed
-there is generally quite a difference between the use of the plus operator vs an explicit
-<code>StringBuilder</code>, <em>especially</em> if you're using Oracle Java5 which performs tree
-times worse the the rest of the crew.</p>
-
-<p>The second observation is that while it generally holds for most of the JDKs that
-an explicit <code>StringBuilder</code> will offer up to twice the speed as the regular plus
-operator, <strong>IBM JDK6 seems not to suffer</strong> from any performance loss, always averaging
-25ms to complete the task in all test cases.</p>
-
-<p>A closer look at the generated bytecode reveals some interesting details</p>
-
-<h1>The bytecode</h1>
-
-<p><em><strong>NOTE:</strong> the decompiled classes are also available on <a href="https://github.com/skuro/stringbuilder">Github</a></em></p>
-
-<p>Across all possible JDKs <code>StringBuilders</code> are <strong>always</strong> used to implement <code>String</code>
-concatenation even in presence of a plus sign.
-Moreover, across all vendors and versions, <strong>there is almost no difference at all</strong>
-for the same test case. The only one that stands a bit apart is <a href="https://github.com/skuro/stringbuilder/blob/master/ecj/CatPlus.class.txt"><code>ecj</code></a>,
-which is the only one to cleverly optimize the <code>CatPlus</code> test case to invoke
-the 1-arg constructor of the <code>StringBuilder</code> instead of the 0-arg version.</p>
-
-<p>Comparing the resulting bytecode exposes what could affect performance in the
-different scnarios:</p>
-
-<ul>
-<li><p>when concatenating with plus, <em>new instances of <code>StringBuilder</code></em> are created
-any time a concatenation happens. This can easily result in a performance
-degradation due to useless invocation of the constructor plus more stress on
-the garbage collector due to throw away instances</p></li>
-<li><p>compilers will take you literally and only initalize <code>StringBuilder</code> with its
-1-arg constructor if and only if you write it that way in the original code. This
-results in respectively four and three invocations of <code>StringBuilder.append</code> for
-<a href="https://github.com/skuro/stringbuilder/blob/master/ecj/CatSB.class.txt">CatSB</a> and <a href="https://github.com/skuro/stringbuilder/blob/master/ecj/CatSB2.class.txt">CatSB2</a>.</p></li>
-</ul>
-
-
-<h1>The conclusion</h1>
-
-<p>Bytecode analysis offers the final answer to the original question.</p>
-
-<blockquote><p>Do you need to explicitly use a <code>StringBuilder</code> to improve performance? <strong>Yes</strong></p></blockquote>
-
-<p>The above graphs clearly show that, unless you're using IBM JDK6 runtime, you will
-loss 50% performance when using the plus operator, although it's the one to perform
-slightly worse across the candidates when expliciting <code>StringBuffers</code>.</p>
-
-<p>Also, it's quite interesting to see how <em>JIT optimizations</em> impact the overall
-performance: for instance, even in presence of different bytecode between the two
-explicit <code>StringBuilder</code> test cases, the end result is absolutely the same in the
-long run.</p>
-
-<p><img src="/img/post/myth-confirmed.jpg" alt="Myth confirmed" /></p>
+<p>Happy development!</p>
</div>
View
79 rss2.xml
@@ -3,7 +3,7 @@
<title type="text" xml:lang="en">SKURO! -- Shading lights</title>
<link type="application/atom+xml" href="http://skuro.tk/rss2/" rel="self"/>
<link type="text" href="http://skuro.tk" rel="alternate"/>
- <updated>2013-03-11T23:43:59+01:00</updated>
+ <updated>2013-03-27T16:47:25+01:00</updated>
<id>http://skuro.tk</id>
<author>
<name>Carlo Sciolla</name>
@@ -11,6 +11,36 @@
<rights>Copyright (c) 2010-2011 Carlo Sciolla</rights>
<entry>
+ <title>H2 support 1.1.1 for Alfresco 3.4.12 Enterprise with Maven</title>
+ <link href="http://skuro.tk/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven/"/>
+ <updated>2013-03-27T00:00:00+01:00</updated>
+ <id>http://skuro.tk/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven/</id>
+ <summary type="html">&lt;p&gt;Just a quick update on the &lt;a href=&quot;https://github.com/skuro/alfresco-h2-support&quot;&gt;H2 support&lt;/a&gt;
+project, today I released the &lt;code&gt;1.1.1&lt;/code&gt; maintenance version which targets
+Alfresco v3.4.12 Enterprise.&lt;/p&gt;
+
+&lt;p&gt;Please make sure you always double check the &lt;a href=&quot;https://github.com/skuro/alfresco-h2-support/wiki/H2-Database-support-for-Alfresco&quot;&gt;official documentation&lt;/a&gt;
+to pick and choose the right version to use in your Alfresco project.&lt;/p&gt;
+
+&lt;h1&gt;H2 and Maven&lt;/h1&gt;
+
+&lt;p&gt;For &lt;del&gt;the sane&lt;/del&gt; those among you that use the &lt;a href=&quot;https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html&quot;&gt;Maven SDK&lt;/a&gt;,
+you should know that &lt;code&gt;H2 support&lt;/code&gt; is used to quickly boot the Alfresco repository
+webapp during your development cycles.&lt;/p&gt;
+
+&lt;p&gt;If you're using a version of Alfresco other than the default 4.x that's assumed
+by the SDK, you must also adapt your H2 support version to be able to start up
+Alfresco. It's as easy as overriding the following maven property:&lt;/p&gt;
+
+&lt;pre&gt;&lt;code&gt;&amp;lt;h2-support.version&amp;gt;1.1.1&amp;lt;/h2-support.version&amp;gt;
+&lt;/code&gt;&lt;/pre&gt;
+
+&lt;p&gt;Happy development!&lt;/p&gt;
+</summary>
+</entry>
+
+
+<entry>
<title>Java StringBuilder myth debunked -- now with content!</title>
<link href="http://skuro.tk/2013/03/11/java-stringbuilder-myth-now-with-content/"/>
<updated>2013-03-11T00:00:00+01:00</updated>
@@ -109,11 +139,11 @@ test class).&lt;/p&gt;
&lt;p&gt;The discussion of the results and some more juicy details will follow.&lt;/p&gt;
-&lt;h2&gt;&lt;img src=&quot;img/post/catplus.png&quot; title=&quot;Concatenation with plus&quot; alt=&quot;Concatenation with plus&quot; /&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;img src=&quot;/img/post/catplus.png&quot; title=&quot;Concatenation with plus&quot; alt=&quot;Concatenation with plus&quot; /&gt;&lt;/h2&gt;
-&lt;h2&gt;&lt;img src=&quot;img/post/catsb.png&quot; title=&quot;Concatenation with StringBuilder&quot; alt=&quot;Concatenation with StringBuilder&quot; /&gt;&lt;/h2&gt;
+&lt;h2&gt;&lt;img src=&quot;/img/post/catsb.png&quot; title=&quot;Concatenation with StringBuilder&quot; alt=&quot;Concatenation with StringBuilder&quot; /&gt;&lt;/h2&gt;
-&lt;p&gt;&lt;img src=&quot;img/post/catsb2.png&quot; title=&quot;Concatenation with initalized StringBuilder&quot; alt=&quot;Concatenation with initialized StringBuilder&quot; /&gt;&lt;/p&gt;
+&lt;p&gt;&lt;img src=&quot;/img/post/catsb2.png&quot; title=&quot;Concatenation with initalized StringBuilder&quot; alt=&quot;Concatenation with initialized StringBuilder&quot; /&gt;&lt;/p&gt;
&lt;h1&gt;The discussion&lt;/h1&gt;
@@ -167,14 +197,14 @@ results in respectively four and three invocations of &lt;code&gt;StringBuilder.
&lt;p&gt;The above graphs clearly show that, unless you're using IBM JDK6 runtime, you will
loss 50% performance when using the plus operator, although it's the one to perform
-slightly worse across the candidates when expliciting &lt;code&gt;StringBuffers&lt;/code&gt;.&lt;/p&gt;
+slightly worse across the candidates when expliciting &lt;code&gt;StringBuilder&lt;/code&gt;s.&lt;/p&gt;
&lt;p&gt;Also, it's quite interesting to see how &lt;em&gt;JIT optimizations&lt;/em&gt; impact the overall
performance: for instance, even in presence of different bytecode between the two
explicit &lt;code&gt;StringBuilder&lt;/code&gt; test cases, the end result is absolutely the same in the
long run.&lt;/p&gt;
-&lt;p&gt;&lt;img src=&quot;img/post/myth-confirmed.jpg&quot; alt=&quot;Myth confirmed&quot; /&gt;&lt;/p&gt;
+&lt;p&gt;&lt;img src=&quot;/img/post/myth-confirmed.jpg&quot; alt=&quot;Myth confirmed&quot; /&gt;&lt;/p&gt;
</summary>
</entry>
@@ -959,42 +989,5 @@ Wednesday, October 12th we're going to have a great &lt;a href=&quot;http://bit.
</entry>
-<entry>
- <title>Clojure makes it to the Alfresco DevCon2011</title>
- <link href="http://skuro.tk/2011/09/04/clojure-makes-it-the-alfresco-devcon-2011-emea-london/"/>
- <updated>2011-09-04T00:00:00+02:00</updated>
- <id>http://skuro.tk/2011/09/04/clojure-makes-it-the-alfresco-devcon-2011-emea-london/</id>
- <summary type="html">&lt;p&gt;If you're a bit into Alfresco, you surerly know what the &lt;a href=&quot;http://www.amiando.com/alfresco-devcon-london-2011.html&quot;&gt;DevCon&lt;/a&gt; is.&lt;/p&gt;
-
-&lt;p&gt;To use the same words from &lt;a href=&quot;http://blogs.alfresco.com/wp/devcon/2011/08/04/save-the-date-alfresco-devcon-san-diego-london/&quot;&gt;Jeff Potts&lt;/a&gt;:
-&amp;nbsp;&lt;br/&gt;
-&amp;nbsp;&lt;/p&gt;
-
-&lt;blockquote&gt;the premier event for digging into the details of the Alfresco platform and collaborating with others who are doing the same&lt;/blockquote&gt;
-
-
-&lt;p&gt;Now, as soon as I received the &lt;a href=&quot;http://ecmarchitect.com/archives/2011/08/09/1449&quot;&gt;CallForPapers&lt;/a&gt; I immediately (and impulsively!) submitted a talk named &lt;em&gt;Alfresco, the Clojure way&lt;/em&gt; in the Customizing Alfresco track, where I wanted to introduce to enthusiastic Alfresco developers how to do their job using a fantastic &lt;a href=&quot;http://clojure.org&quot;&gt;programming language&lt;/a&gt;. It was just last week that I was notified that yes, my talk made it to the conference schedule! Clojure goes to London!&lt;/p&gt;
-
-&lt;p&gt;It will be great chance for Clojure to prove itself a great tool, and to get some more exposure to software professionals around Europe and beyond. Now that things got serious, I really need to put my presentation together, and that's where you can provide some help.&lt;/p&gt;
-
-&lt;p&gt;I still don't know the time slot the presentation will be given, but surely enough I'll publish online the full version of it as soon as I'll be back from London. The following is the initial list of topics I'd like to cover, but I'm eager to know from you what you would like to add to it.&lt;/p&gt;
-
-&lt;h2&gt;High level topics&lt;/h2&gt;
-
-&lt;ul&gt;
- &lt;li&gt;crash-course on &lt;a href=&quot;http://clojure.org/reader&quot;&gt;Clojure syntax&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;extremely fast digression on some core language features and &lt;a href=&quot;http://en.wikipedia.org/wiki/Functional_programming&quot;&gt;functional programming&lt;/a&gt; topics&lt;/li&gt;
- &lt;li&gt;introduction to &lt;a href=&quot;https://github.com/skuro/lambdalf&quot;&gt;lambdalf&lt;/a&gt;, a Clojure adapter to the Alfresco &lt;a href=&quot;http://wiki.alfresco.com/wiki/Java_Foundation_API&quot;&gt;Foundation API&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;introduction to the &lt;a href=&quot;https://github.com/skuro/spring-webscripts-addon-clojure&quot;&gt;Clojure addon&lt;/a&gt; for the Spring Web Script framework&lt;/li&gt;
- &lt;li&gt;show and tell: start Alfresco, start a &lt;a href=&quot;https://github.com/technomancy/swank-clojure&quot;&gt;swank&lt;/a&gt; server and do live coding against the repository&lt;/li&gt;
- &lt;li&gt;&lt;em&gt;OPTIONAL:&lt;/em&gt; showcase a Clojure-based &lt;a href=&quot;https://github.com/skuro/lambdalf-samples&quot;&gt;sample&lt;/a&gt; Alfresco application&lt;/li&gt;
-&lt;/ul&gt;
-
-
-&lt;p&gt;Again, I don't know how much time I'll be given, so I can't even guarantee I'll have time for all the above topics to get a proper introduction, but since I also might have still enough time to cover other topics, what would you like to see in there?&lt;/p&gt;
-</summary>
-</entry>
-
-
</feed>
View
9 sitemap.xml
@@ -3,7 +3,7 @@
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://skuro.tk/</loc>
- <lastmod>2013-03-21T10:14:38+01:00</lastmod>
+ <lastmod>2013-03-27T16:47:25+01:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
@@ -15,6 +15,13 @@
</url>
<url>
+ <loc>http://skuro.tk/2013/03/27/h2-support-for-alfresco-3-4-12-and-maven/</loc>
+ <lastmod>2013-03-27T00:00:00+01:00</lastmod>
+ <changefreq>weekly</changefreq>
+ <priority>0.8</priority>
+ </url>
+
+ <url>
<loc>http://skuro.tk/2013/03/11/java-stringbuilder-myth-now-with-content/</loc>
<lastmod>2013-03-11T00:00:00+01:00</lastmod>
<changefreq>weekly</changefreq>
Please sign in to comment.
Something went wrong with that request. Please try again.