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

Excessive garbage generation during drag-and-drop and painting in 1.4beta

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.0
    • client-libs
    • 2d
    • x86
    • windows_2000, windows_xp



      Name: yyT116575 Date: 07/30/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      Existing Swing applications doing a lot of painting and drag-and-drop
      on Windows suddenly perform unacceptably when using the 1.4beta runtime.

      We produce class libraries to make it easy to build graph/network/diagram
      editors. Users can select one or more graphical objects in a window and
      drag them around to reposition them, or to copy them (if the control key
      is held down).

      The problem occurs only with 1.4.0 beta, on all the Windows platforms
      we have tested: Windows 98, Windows NT, and Windows 2000. Using the
      same JAR files with JRE/JDK 1.3.1 or earlier (all the way back to 1.2.0)
      performs OK on all the same platforms and machines.

      I cannot include source code here, but can point you to some JAR files
      that exhibit this problem: http://www.nwoods.com/temp/JGo/JGo.jar and
      Demo1.jar. Also download star.gif and doc.gif from the same directory.

      Run Demo1 (which is an executable JAR) and invoke the "Lots of stuff"
      command on the Insert menu. Select a bunch of objects and drag them
      around in a circle.

      You'll find that on Windows 2000 after a few seconds everything freezes
      for a second or two, and then it recovers and catches up with your mouse
      movement.

      On Windows 98 the behavior is much worse--it seems the objects you drag
      can't keep up at all.

      But use JRE 1.3.0 or 1.3.1 on the same machines with this same app, and
      everything keeps up with your mouse movement pretty well.

      I've tried narrowing down the problem, and found that using drag-and-drop
      is partly to blame. Doing the same operations without using the awt.dnd
      mechanisms improves the responsiveness and reduces the frequency of "freezes".
      But they still happen.

      My guess is that frequent garbage collections of Windows resources are causing
      the "freezes". I couldn't find any documentation on Java runtime changes
      that would account for the new behavior with 1.4beta.

      If you'd like source code, I can arrange that privately. I'm also willing to
      try to come up with a simple example program, if you can confirm there is
      indeed a problem that you need help tracking down.
      (Review ID: 129072)
      ======================================================================

            tdv Dmitri Trembovetski (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: