cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Allsopp (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-2850) Converting bytes to hex string is unnecessarily slow
Date Thu, 28 Jul 2011 22:54:09 GMT


David Allsopp updated CASSANDRA-2850:

    Attachment: 2850-v5.patch

OK, v5 attached with bugfix; performance seems at least as good as previous (buggy) version.

I _hope_ the patch problems have also gone away - it applies to trunk for me  without complaint
(using eclipse) and without needing to adjust the fuzz factor!

> Converting bytes to hex string is unnecessarily slow
> ----------------------------------------------------
>                 Key: CASSANDRA-2850
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: David Allsopp
>            Assignee: David Allsopp
>            Priority: Minor
>             Fix For: 0.8.3
>         Attachments: 2850-rebased.txt, 2850-v2.patch, 2850-v4.patch, 2850-v4a.patch,
> ByteBufferUtil.bytesToHex() is unnecessarily slow - it doesn't pre-size the StringBuilder
(so several re-sizes will be needed behind the scenes) and it makes quite a few method calls
per byte.
> (OK, this may be a premature optimisation, but I couldn't resist, and it's a small change)
> Will attach patch shortly that speeds it up by about x3, plus benchmarking test.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message