<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=juergen.hoeller" rel="nofollow">Juergen Hoeller</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6543?redirect=false" rel="nofollow">SPR-6543</a></strong> and commented</p>
<p dir="auto">Support for JSF 2.0's view scope, as exposed through UIViewRoot.getViewMap().<br>
Possibly also for "facesRequest" scope: FacesContext.getAttributes().<br>
Also research options for making good use of the JSF 2.0 flash scope.</p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111055" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12758" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12758/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12758">#12758</a> Specific support for JSF 2.2 / 2.3</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099737" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11082" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11082/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11082">#11082</a> Provide conversation management support</li>
</ul>
<p dir="auto">51 votes, 44 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=charlesb" rel="nofollow">Charles Blaxland</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2772?redirect=false" rel="nofollow">SPR-2772</a></strong> and commented</p>
<p dir="auto">When many threads attempt to create non-singleton beans simultaneously Spring's performance is extremely poor. Spring 2.0 also seems to be worse than Spring 1.2.8 in this regard. I suspect its due to all the synchronized blocks in the BeanFactory.</p>
<p dir="auto">I have a heavily threaded server application, which at a certain point creates a bunch of nested non-singleton beans via a Spring lookup-method. While running load tests I noticed this step was a bottleneck in our application. I wrote a small test application which created a number of threads which all tried to create a number of non-singleton beans. The results are below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Spring 2.0
==========
singleton=&quot;false&quot;
-----------------
08188ms 1 Thread, 10000 bean creations per thread (10000 total)
15656ms 10 Threads, 1000 bean creations per thread (10000 total)
24703ms 100 Threads, 100 bean creations per thread (10000 total)
27235ms 1000 Threads, 10 bean creations per thread (10000 total)

singleton=&quot;true&quot;
----------------
01110ms 1 Thread, 10000 bean creations per thread (10000 total)
01266ms 10 Threads, 1000 bean creations per thread (10000 total)
01281ms 100 Threads, 100 bean creations per thread (10000 total)
01515ms 1000 Threads, 10 bean creations per thread (10000 total)


Spring 1.2.8
============
singleton=&quot;false&quot;
-----------------
04797ms 1 Thread, 10000 bean creations per thread (10000 total)
05719ms 10 Threads, 1000 bean creations per thread (10000 total)
13000ms 100 Threads, 100 bean creations per thread (10000 total)
17922ms 1000 Threads, 10 bean creations per thread (10000 total)"><pre class="notranslate"><code class="notranslate">Spring 2.0
==========
singleton="false"
-----------------
08188ms 1 Thread, 10000 bean creations per thread (10000 total)
15656ms 10 Threads, 1000 bean creations per thread (10000 total)
24703ms 100 Threads, 100 bean creations per thread (10000 total)
27235ms 1000 Threads, 10 bean creations per thread (10000 total)

singleton="true"
----------------
01110ms 1 Thread, 10000 bean creations per thread (10000 total)
01266ms 10 Threads, 1000 bean creations per thread (10000 total)
01281ms 100 Threads, 100 bean creations per thread (10000 total)
01515ms 1000 Threads, 10 bean creations per thread (10000 total)


Spring 1.2.8
============
singleton="false"
-----------------
04797ms 1 Thread, 10000 bean creations per thread (10000 total)
05719ms 10 Threads, 1000 bean creations per thread (10000 total)
13000ms 100 Threads, 100 bean creations per thread (10000 total)
17922ms 1000 Threads, 10 bean creations per thread (10000 total)
</code></pre></div>
<p dir="auto">You can see that for the same number of bean creations, the time taken increases rapidly as you increase the number of threads. Obviously there is some overhead in managing the many threads, but not enough to account for what is seen here. Its apparent that Spring 2.0 is also 60-70% slower than 1.2.8 for this task, even with a single thread.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2.8, 2.0 final</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/12075/screenshot+profiling+session.jpg" rel="nofollow">screenshot profiling session.jpg</a> (<em>293.05 kB</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/12074/Spring2TestBean.java" rel="nofollow">Spring2TestBean.java</a> (<em>672 bytes</em>)</li>
<li><a href="https://jira.spring.io/secure/attachment/12072/springtest.zip" rel="nofollow">springtest.zip</a> (<em>1.98 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398073300" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7573" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7573/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7573">#7573</a> Poor performance creating prototype beans (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398074080" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7667" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7667/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7667">#7667</a> Spring performance is insufficient for intensive work at short scopes</li>
</ul>
<p dir="auto">6 votes, 2 watchers</p>