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

libzip should use pread instead of lseek+read

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      libzip is used heavily during class loading when a jar is used. Currently it uses lseek and read when loading classes from the zip file. This incurs 2 system calls. The equivalent can be achieved using pread which is a single syscall on Linux.

      Windows also allows you to do something similar by using OVERLAPPED with ReadFile. When used in synchronous mode, Windows will use OVERLAPPED.Offset as the offset to read from. This allows avoiding SetFilePosition, the equivalent of lseek.

            jcking Justin King
            jcking Justin King
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: