Skip to content

Use thread local decoder cache in Binary toStringUsingUTF8() #1531

Closed

Description

@asfimport

In Binary toStringUsingUTF8(), new String(...) is slower because it instantiates a new Decoder, while Charset#decode uses a thread-local decoder cache, it is much faster.

ByteArraySliceBackedBinary is using Charset#decode, while, ByteArrayBackedBinary and ByteBufferBackedBinary are still using new String()

Reporter: Zhenxiao Luo / @zhenxiao
Assignee: Zhenxiao Luo / @zhenxiao

Related issues:

Note: This issue was originally created as PARQUET-74. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Aug 28, 2014

    @asfimport
    Author

    Julien Le Dem / @julienledem:
    Thanks for submitting a patch.
    This has been merged in
    https://github.com/apache/incubator-parquet-mr/pull/40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions