<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>
><br>
> > Just a little question, what did we gain by sharing searchcontext? The<br>
> > point of performMatch and local searchcontexts was to reduce the locks<br>
> > on the searchcontext. Currently, we still lock everytime we add a<br>
> > match and DataPolicy is useless.<br>
><br>
> We also locked previously when calling addMatchesTo(), the main benefict is<br>
> that local SearchContext share the data instead of copying it. So we have<br>
> effectively _one_ shared list instead of a global list where multiple local<br>
> list copied their data.<br>
><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> </div><div>I don't see much problem with the locks. Adding a match to the context is fast enough and that'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>