[ 
https://issues.apache.org/jira/browse/SOLR-7110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323227#comment-14323227
 ] 

Noble Paul commented on SOLR-7110:
----------------------------------

This is a micro benchmark. I'm attaching the perf test along with the patch. 
TestJavabinCodec.testPerf()

bq.Measuring memory isn't enough here... GC is very efficient at cleaning up 
short lived objects, and the only downside to letting GC do it is some CPU 
time, which should show up in a throughput benchmark if this is a win.

The GC does not happen immediately at all . It may happen when it happens . But 
the real challenge is, Solr has an increasingly large memory footprint and as 
the heap grows , the probability of us pushing the JVM to do  a full GC keeps 
going up . The overall CPU cost of this operation is still negligible , even 
when GC happens. So, this is not really an optimization on CPU, it is a memory 
optimization.

> Optimize JavaBinCodec to minimize string Object creation
> --------------------------------------------------------
>
>                 Key: SOLR-7110
>                 URL: https://issues.apache.org/jira/browse/SOLR-7110
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>            Priority: Minor
>         Attachments: SOLR-7110.patch, SOLR-7110.patch
>
>
> In JavabinCodec we already optimize on strings creation , if they are 
> repeated in the same payload. if we use a cache it is possible to avoid 
> string creation across objects as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to