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

Choices and Lists consume a lot of user and system resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.1.4, 1.1.6, 1.1.8
    • client-libs
    • generic, x86
    • windows_95, windows_nt



      Name: joT67522 Date: 10/24/97


      import java.awt.*;

      class ResourceTest {
          public static void main(String args[]) {
              Frame f = new Frame("ResourceTest");
              f.setLayout(new FlowLayout());
              for (int i = 0; i < Integer.parseInt(args[0]); ++i)
                  f.add(new Button("Button" + i));
              for (int i = 0; i < Integer.parseInt(args[1]); ++i)
                  f.add(new List());
              for (int i = 0; i < Integer.parseInt(args[2]); ++i)
                  f.add(new Choice());
              for (int i = 0; i < Integer.parseInt(args[3]); ++i)
                  f.add(new Checkbox("Checkbox" + i));
              f.pack();
              f.setVisible(true);
          }
      }

      The windows in my application have several Choices and Lists.
      My users use Windows 95 and when they open 3 windows, they run out of "system" and
      "user" resources (as reported by the Resource Monitor application).
      As the attached source code will tell you, creating a 100 lists or 100 choices brings
      down resources by ~30%.

      This is obviously a bad implementation because this does not happen with Microsoft's
      SDK. Also, it does not happen on Windows NT. NT seems to have no limitation on user
      and system resources.


      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            johsunw Joon Oh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: