<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
&gt;<br>
&gt; &gt; Just a little question, what did we gain by sharing searchcontext? The<br>
&gt; &gt; point of performMatch and local searchcontexts was to reduce the locks<br>
&gt; &gt; on the searchcontext. Currently, we still lock everytime we add a<br>
&gt; &gt; match and DataPolicy is useless.<br>
&gt;<br>
&gt; We also locked previously when calling addMatchesTo(), the main benefict is<br>
&gt; that local SearchContext share the data instead of copying it. So we have<br>
&gt; effectively _one_ shared list instead of a global list where multiple local<br>
&gt; list copied their data.<br>
&gt;<br>
<br>
</div>My point was this was the original setup before I added performMatch<br>
to reduce the locks as Aaron suggested last year. Back then, we added<br>
matches directly to a global searchcontext.</blockquote><div>&nbsp;</div><div>I don&#39;t see much problem with the locks. Adding a match to the context is fast enough and that&#39;s the only operation that can create contention. But, I guess that you and Aaron had good reasons to modify it back then and those reasons may still hold true ... What are them?<br>
<br></div></div><br>-- <br>Jordi Polo Carres<br>NLP laboratory - NAIST<br><a href="http://www.bahasara.org">http://www.bahasara.org</a><br>