[ https://issues.apache.org/jira/browse/SOLR-913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656434#action_12656434 ]
Noble Paul commented on SOLR-913: --------------------------------- bq.if there were to be another piece of code , that inadvertently - calls this piece of code once again by creating additional Pattern objects would be suicidal there is no other piece of code currently calling it inside Solr. There is a tradeoff of complexity Vs. perf advantage Maintaining a large system such as Solr is hard as it is. So we have to keep in mind that we keep the code simpler. Unless there is a known issue let us not solve it now and add complexity > org/apache/solr/handler/SnapPuller.java - Expensive Pattern object made > static > -------------------------------------------------------------------------------- > > Key: SOLR-913 > URL: https://issues.apache.org/jira/browse/SOLR-913 > Project: Solr > Issue Type: Improvement > Components: clients - java > Environment: Tomcat 6, JRE 6 > Reporter: Kay Kay > Fix For: 1.4 > > Attachments: SOLR-913.patch > > Original Estimate: 2h > Remaining Estimate: 2h > > In the class - org.apache.solr.handler.SnapPuller - there seems to be an > expensive Pattern object created locally in the method > static Integer readInterval(String interval) ; > Pattern instances are better created as static objects and reused. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.