phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4004) Assorted improvements to reduce garbage in mutable index codepath
Date Mon, 10 Jul 2017 18:41:00 GMT


Josh Elser commented on PHOENIX-4004:

bq. Why not just set it to edit.size()? Looking at the code, we'll never add more cells to
indexUpdates than there are cells in the edit. Not need to have a minimum of 64.

Oh, no this is actually capping the maximum initial size to be 64 elements (min/max is always
confusing). When there are less than 64 cells, we set the list capacity to be exactly that
number of elements. When we have more than 64 cells, we set the initial capacity to be 64.

I was trying to avoid creating an extremely long list here (when we had many cells) in the
hopes that the dynamic resizing would be less "immediately" painful. Thinking about this some
more, I'm not sure if this is even a worthwhile "optimization".

Just remove it. Posterity/history is what git is for
Also can get rid of the pool member and remove the constructor now.

Fine by me :). I was just deferring the removal since the original fix didn't remove that.

> Assorted improvements to reduce garbage in mutable index codepath
> -----------------------------------------------------------------
>                 Key: PHOENIX-4004
>                 URL:
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>            Priority: Minor
>             Fix For: 4.12.0
>         Attachments: PHOENIX-4004.001.patch
> During some $dayjob testing, I found a couple of places where we were unnecessarily creating
garbage in the RS. When "forward-porting" this change, most of the areas were already cleaned
up but there are a few that still apply.
> * ArrayList initial sizing
> * Avoid indirection of the (single-threaded) ExecutorService in IndexBuildManager (just
pure overhead)
> * Some unnecessary KeyValue copies and an array copy (an avoidance of deprecated HBase
> * Avoid extra {{System.arraycopy}} calls in CoveredColumnIndexCodec via the {{ArrayUtils.addAll}}

This message was sent by Atlassian JIRA

View raw message