[
https://issues.apache.org/jira/browse/LUCENE-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989223#comment-13989223
]
Robert Muir commented on LUCENE-5640:
-------------------------------------
I benchmarked this against trunk, by hacking both checkouts to have a
NoReuseStrategy... this patch is significantly (like 30-50%) slower than trunk.
I think this java7 methodhandles stuff is very slow, it totally dominates the
cpu...
{noformat}
CPU SAMPLES BEGIN (total = 30511) Sun May 4 21:01:17 2014
rank self accum count trace method
1 66.09% 66.09% 20164 300743 java.lang.invoke.MethodHandleNatives.init
2 6.73% 72.81% 2052 300808 java.lang.Object.notifyAll
3 6.44% 79.25% 1965 300823 java.lang.invoke.MethodHandleNatives.init
4 0.95% 80.20% 289 300863
org.apache.lucene.codecs.compressing.LZ4.compress
5 0.88% 81.08% 269 301196
org.apache.lucene.index.FreqProxFields$FreqProxDocsAndPositionsEnum.reset
{noformat}
on the other hand with trunk, its of course slower than when we are reusing by
far, but you dont see this stuff:
{noformat}
CPU SAMPLES BEGIN (total = 23623) Sun May 4 21:05:15 2014
rank self accum count trace method
1 13.48% 13.48% 3184 300667 java.lang.Object.notifyAll
2 13.23% 26.71% 3125 300741
org.apache.lucene.analysis.core.LowerCaseFilter.<init>
3 4.06% 30.77% 959 300768 java.util.LinkedHashMap.addEntry
4 1.98% 32.75% 468 300767
org.apache.lucene.util.AttributeSource.addAttributeImpl
5 1.60% 34.35% 379 300810 org.apache.lucene.util.BytesRefHash.add
6 1.46% 35.81% 345 300763
org.apache.lucene.analysis.standard.StandardTokenizerImpl.zzRefill
7 1.35% 37.17% 320 300812
org.apache.lucene.util.packed.AbstractAppendingLongBuffer.size
{noformat}
"just say no to MethodHandle"... good to know :)
> Cleanup Token class
> -------------------
>
> Key: LUCENE-5640
> URL: https://issues.apache.org/jira/browse/LUCENE-5640
> Project: Lucene - Core
> Issue Type: Sub-task
> Components: modules/analysis
> Reporter: Uwe Schindler
> Fix For: 4.9, 5.0
>
> Attachments: LUCENE-5640.patch, LUCENE-5640.patch, LUCENE-5640.patch
>
>
> We should remove code duplication in the Token class:
> - copy constructors
> - reinit() shit
> - non-default clone()
> This is too bugy. Most of the methods can be simply removed. In fact, Token
> should just look like a clone of all AttributeImpl it implements.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]