ICEpdf
  1. ICEpdf
  2. PDF-1043

Memory benchmarking details required for image creation

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.1.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      NA

      Description

      We have a customer reporting an issue that their system is going frequently out of memory & our analysis points to the fact that ICESoft library is consuming this memory to generate the images

      Here is the apis that we are calling
      BufferedImage thumbnailImage = null;
              synchronized(UAPMarkupHelper.lock) {
               thumbnailImage=(BufferedImage) document.getPageImage(0, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, thumbScale);
              }
              RenderedImage rendThubnailImage = thumbnailImage;
              try {
                  File file = new File(outputFileName);
                  ImageIO.write(rendThubnailImage, outputFileName.substring(outputFileName.lastIndexOf(".")+1), file);
              } catch (IOException e) {
                  LOG.error(e);
                  return false;

      We wanted to understand from ICESOFT, What is the benchmarking data on what amount of memory is required by this library for what type / size of documents. With this data, we can go back to the customer & tell what is the minimum memory requirement in their case.

      Let us know if you have any questions on this..

      Thanks,
      Mayank

        Activity

        Hide
        Patrick Corless added a comment -

        The PDF document format is highly compressed and pin pointing memory usage simply on the file size can be quite misleading. We generally suggest that the icepdf library has access to at 512 MB of memory and if the content is very media rich then 1GB maybe needed. Decoding some image formats and converting them to RGB can be quite memory intensive. Generally there are just spikes in memory use during parsing of such images then the temporary objects are quickly collected.

        The icepdf library is most commonly used in a heap with other programs. So it a good idea when setting a max heap size to factor in the main applications usage plus that need by icepdf. The icepdf library makes heavy usage of the Java Reference interface and as a result the JVM can quickly decrease its memory usage when heap space is low.

        Show
        Patrick Corless added a comment - The PDF document format is highly compressed and pin pointing memory usage simply on the file size can be quite misleading. We generally suggest that the icepdf library has access to at 512 MB of memory and if the content is very media rich then 1GB maybe needed. Decoding some image formats and converting them to RGB can be quite memory intensive. Generally there are just spikes in memory use during parsing of such images then the temporary objects are quickly collected. The icepdf library is most commonly used in a heap with other programs. So it a good idea when setting a max heap size to factor in the main applications usage plus that need by icepdf. The icepdf library makes heavy usage of the Java Reference interface and as a result the JVM can quickly decrease its memory usage when heap space is low.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: