You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Mike Drob (Jira)" <ji...@apache.org> on 2021/08/20 17:50:00 UTC
[jira] [Resolved] (SOLR-15559) Avoid object creation in
splitSmart()
[ https://issues.apache.org/jira/browse/SOLR-15559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Drob resolved SOLR-15559.
------------------------------
Fix Version/s: main (9.0)
Resolution: Fixed
> Avoid object creation in splitSmart()
> -------------------------------------
>
> Key: SOLR-15559
> URL: https://issues.apache.org/jira/browse/SOLR-15559
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: main (9.0), 8.9
> Reporter: Gus Heck
> Assignee: Gus Heck
> Priority: Minor
> Fix For: main (9.0)
>
> Attachments: MyBenchmark.java
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> While reading code for other things I noticed a small inefficiency in the splitSmart(String, String, boolean) method where it's creating new StringBuilder objects unnecessarily inside a loop. For fun I fixed this and JMH bench marked the fix to see what it was worth. The answer is about 30% relative improvement, but only a couple microseconds absolute. Not exactly exciting since I don't think there's anywhere that really loops hard on this, but having it coded and tests passing and improvements measured, might as well put it in.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org