Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8298639

Perform I/O operations in bulk for RandomAccessFile

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • None
    • b03

      RandomAccessFile performs operations for the longer primitives (e.g. int and long) using several invocations of native JNI methods. For example, readLong() invokes 8 JNI method calls.

      It would be better to perform these operations in bulk. In the example above, the readLong() would only do one JNI method call. This is likely to improve performance with a factor of almost eight for long/double operations and with a factor of almost four for int/float operations.

      As this class is used by other JDK classes (e.g. for image handling), the performance improvements would propagate to these classes.

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: