You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Gus Heck (Jira)" <ji...@apache.org> on 2021/08/24 13:57:00 UTC
[jira] [Commented] (SOLR-15559) Avoid object creation in
splitSmart()
[ https://issues.apache.org/jira/browse/SOLR-15559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403819#comment-17403819 ]
Gus Heck commented on SOLR-15559:
---------------------------------
I had been considering porting this back to 8x too, but then got distracted, which is why I hadn't closed it.
> 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