On 2013-08-19 22:12, Dominique Pellé wrote: > In this example, the speed up is +37.5%. Useful speed up, but at the > same time I was hoping for more speed up given that I have 4 > cores on my i5 laptop. While checking the sample file, 'top' reports > that java process used "only" ~ 220% of the CPU in general, and > not 400% as it would be in the ideal case.
I checked with gnome-system-monitor and it reports all 4 CPUs at about 100% (after the initial text analysis). visualvm shows all 4 threads as a green bar, so there does not seem to be contention. I also tried using a ExecutorCompletionService[1] and changed the size of the rules that each worker threads has to match. It doesn't really matter a lot, but using only 1 rule per callable causes too much overhead. Using 4 threads means that each callable will have to match 450 rules (I'm trying with German text) and that works fine. So I don't know how to further improve this, expect also running the text analysis in parallel. Maybe there's one very slow rule for Esperanto that slows down everything? We already have a --profile option to check that. Regards Daniel [1] http://www.baptiste-wicht.com/2010/09/java-concurrency-part-7-executors-and-thread-pools/ -- http://www.danielnaber.de ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Languagetool-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/languagetool-devel
