ZipCoder performance improvements

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      I see jdk9 has a fast path for decoding zip file names when the charset is UTF-8 as we expect. I suspect we can do better - I expect most zip file metadata to be pure ASCII and for the JDK to support COMPACT_STRINGS, in which case we could even share the byte arrays if we use the String(byte[], coder) constructor. No need to convert the byte[] to char[] and then back to the identical byte[].

      But I don't see any jigsaw-blessed way of calling that String constructor; current uses are all in java.lang. At least all of java.base should be able to make use of it somehow.

            Assignee:
            Xueming Shen
            Reporter:
            Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: