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

sun.print.Win32PrintService.initMedia() is slow

XMLWordPrintable

    • 2d
    • b132
    • x86
    • windows_xp, windows_vista
    • Verified

      FULL PRODUCT VERSION :
      java version "1.6.0_10-beta"
      Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
      Java HotSpot(TM) Client VM (build 11.0-b12, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.0.6001]

      A DESCRIPTION OF THE PROBLEM :
      When I print a single page in my application it takes Java approximately 3 seconds to go from PrinterJob.print() to invoking Printable.print(). I profiled this in Netbeans and noticed that most of this time is used by sun.print.Win32PrintService.initMedia().

      This delay is especially disturbing in light of the fact it takes the Printable less time to generate the entire output than it takes Java to initialize the printer.

      Normally this wouldn't be such a problem but this delay seriously decreases my productivity when I'm debugging the Printable.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I am expecting less than 300ms to elapse between PrinterJob.print() and Printerable.print(), especially consider the fact I am running on a very fast computer.
      ACTUAL -
      3 seconds between PrinterJob.print() and Printable.print()

      REPRODUCIBILITY :
      This bug can be reproduced always.

            jgodinez Jennifer Godinez (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: