ICEpdf
  1. ICEpdf
  2. PDF-130

CPU optimisations for numerous shapes

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0 - Beta
    • Fix Version/s: 4.0
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Win XP SP3, Sun jdk1.5.0_19 and jdk1.6.0_14, Intel Core 2 Duo 2.13 GHz, 2 GB RAM.

      Description

      After doing PDF-127 memory optimisations, now would be a good time to do some CPU optimisations. I noticed that on the Android website they gave a list of optimisation recommendations, so figured I'd try out the one where you access class instance fields via a cached stack reference. Patrick pointed out that in PDFs with a large number of shapes, we spend a disproportionate amount of time growing the shapes vector.

      All testing was done on \\iceads1\Public\ICEpdf Development\QA\transitmap_2004.pdf which contains over 566,000 shapes. We parse it into a single shapes vector. I ran all the tests under a modified version of the tagging code from PDF-114, where it would only load that one PDF and go through the pages, of which there is only one, and init() the page. The file is loaded locally, from my hard-drive, and the milliseconds are reported from load to dispose.

      Commencing tagging file 1439 of 1532
      D:\ICEpdf\iceads1__Public__ICEpdf_Development\QA\transitmap_2004.pdf

      I ran the test 4x in a row, and discarded the first run, since that would reflect system caching more than anything. This is the baseline:

      Duration: 54.531 seconds
      Duration: 54.640 seconds
      Duration: 54.890 seconds

        Activity

          People

          • Assignee:
            Mark Collette
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: