ICEpdf
  1. ICEpdf
  2. PDF-858

Evaluate in RandomAccess file access vs in memory loading

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 6.0.0_P01
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Any

      Description

      A client sent in a rather large document (~128MB) with concerns around the length of time it took to search the document's 4500 pages. After some time with the profiler it became evident that the after about 1400 pages page searching began to significantly slow down. The performance bottle neck appeared to be the RandomAccessFile's read method.

      Further research is needed to look at possible ways to speed the read up in such a large file.

        Activity

        Hide
        Patrick Corless added a comment -

        Nice little summary of different techniques here, http://nadeausoftware.com/articles/2008/02/java_tip_how_read_files_quickly

        Show
        Patrick Corless added a comment - Nice little summary of different techniques here, http://nadeausoftware.com/articles/2008/02/java_tip_how_read_files_quickly
        Hide
        Patrick Corless added a comment -

        A new system property org.icepdf.core.filecache.enabled=true has been added to load a file into memory. A max file size of 200MB has been chosen as the default max size. The max size can be changed with the following property, org.icepdf.core.filecache.size=200000000. Size is specified in bytes.

        The older org.icepdf.core.streamcache.enabled=true default property has been turned to off by default. This property when enabled would cache a byte stream to disk.

        Show
        Patrick Corless added a comment - A new system property org.icepdf.core.filecache.enabled=true has been added to load a file into memory. A max file size of 200MB has been chosen as the default max size. The max size can be changed with the following property, org.icepdf.core.filecache.size=200000000. Size is specified in bytes. The older org.icepdf.core.streamcache.enabled=true default property has been turned to off by default. This property when enabled would cache a byte stream to disk.
        Hide
        Patrick Corless added a comment -

        Keeping this issue open for a bit longer to make sure this is the behavior we want going forward. May still revert org.icepdf.core.streamcache.enabled to it's default value.

        Show
        Patrick Corless added a comment - Keeping this issue open for a bit longer to make sure this is the behavior we want going forward. May still revert org.icepdf.core.streamcache.enabled to it's default value.
        Hide
        Patrick Corless added a comment -

        Going to keep the property for now. Marking as fixed.

        Show
        Patrick Corless added a comment - Going to keep the property for now. Marking as fixed.
        Hide
        Patrick Corless added a comment -

        Re-opening, as I found an issue on how I'm incorrectly check in the file size.

        Show
        Patrick Corless added a comment - Re-opening, as I found an issue on how I'm incorrectly check in the file size.
        Hide
        Patrick Corless added a comment -

        Touched up code used to calculate the file size so that in memory file loading will work on files < 200MB in size.

        Show
        Patrick Corless added a comment - Touched up code used to calculate the file size so that in memory file loading will work on files < 200MB in size.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: