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

List's removeAll is too slow in win32

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86
    • OS:
      windows_95
    • Verification:
      Verified

      Description

      JDK Version:1.2beta3-J
      OS: Win95 + WinNT
      Locale: zh

      On win95, when using removeAll to remove all the items of a List,
      it is really too slow. But in Solaris, it works very quickly.

      ===========================CheckList.java===========================
      import java.awt.*;
      import java.awt.event.*;
      import java.io.*;

      public class CheckList implements ActionListener {
         Button button;
         List list;
         public static void main(String args[]) {
             new CheckList();
         }

         public CheckList() {
             Frame f = new Frame("Check List");
             f.setLayout(new BorderLayout());
             button = new Button("Remove All");
             button.addActionListener(this);
             list = new List(20);
             for (int i = 0; i < 800; i ++) {
                 list.add("My number is " + i);
             }
             f.add("North", button);
             f.add("South", list);
             f.pack();
             f.setVisible(true);
          }

         public void actionPerformed(ActionEvent e) {
              if (list.getItemCount() > 0) {
                 list.removeAll();
                 list.invalidate();
             }
         }


      }
      =====================================================================

      java CheckList

      wait, wait, and wait..........

      jim.hu@prc 1998-03-05

      In Solaris, List add is also too slow.
      in JDK1.1.3 all removeAll and add methods works very quickly.
      I have filed this bug for several days, but till now, I get no
      response. Every engineer who is doing java programming, and using
      List in his program will find it unacceptable.
      Evry one who want to see this problem can run the short
      program in Win95 and Solaris.

      jim.hu@prc 1998-03-12

        Attachments

          Activity

            People

            • Assignee:
              duke J. Duke (Inactive)
              Reporter:
              jhusunw Jim Hu (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: