hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Dimiduk <ndimi...@gmail.com>
Subject Re: [jira] [Created] (HBASE-13578) Remove Arrays.asList().subList() from FSHLog.offer()
Date Tue, 28 Apr 2015 16:23:49 GMT
To unsubscribe, mail dev-unsubscribe@hbase.apache.org .

On Tue, Apr 28, 2015 at 4:00 AM, <dinuswt22@gmail.com> wrote:

> Please unsubscribe me from this group
>
>
> Thanks,
>
> Dinesh Kumar P
>
>
>
>
>
>
> Sent from Windows Mail
>
>
>
>
>
> From: Matteo Bertozzi (JIRA)
> Sent: ‎Tuesday‎, ‎28‎ ‎April‎ ‎2015 ‎04‎:‎02‎ ‎PM
> To: dev@hbase.apache.org
>
>
>
>
>
> Matteo Bertozzi created HBASE-13578:
> ---------------------------------------
>
>              Summary: Remove Arrays.asList().subList() from FSHLog.offer()
>                  Key: HBASE-13578
>                  URL: https://issues.apache.org/jira/browse/HBASE-13578
>              Project: HBase
>           Issue Type: Improvement
>           Components: wal
>     Affects Versions: 1.0.0, 2.0.0, 1.1.0
>             Reporter: Matteo Bertozzi
>             Assignee: Matteo Bertozzi
>             Priority: Trivial
>          Attachments: ArrayTest.java, HBASE-13578-v0.patch
>
> while doing a run with a profiler I noticed this:
> {code}
> FSHLog.java
> void offer(final long sequence, final SyncFuture [] syncFutures, final int
> syncFutureCount) {
>   ...
>   this.syncFutures.addAll(Arrays.asList(syncFutures).subList(0,
> syncFutureCount));
> }
> {code}
> it is creating an Arrays.ArrayList then a RandomAccessSubList,
> and then addAll() is using creating an iterator and call the
> syncFutures.add() for each item.
>
> a simpler for loop adding the items directly is not too ugly and it will
> avoid all this stuff.
> I've attached a simple test to compare the two, it will not make huge
> difference but since we are in the core patch any tiny bit probably helps.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message