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

On solaris, JDKversion1.2beta3-J List's add() method is much slower.

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description

      JDK Version:1.2beta3-J
      OS: Solaris
      Locale:

      On Solaris, JDKversion 1.2beta3-J, List add(String) method is much slower
      than previous version, such as jdk1.1.3.
      ==============================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();
      button.setLabel("Add Items");
              } else {
      for (int i = 0; i < 800; i ++) {
      list.add("My number is " + i);
      }
      button.setLabel("Remove All");
      }
         }


      }

      jim.hu@prc 1998-03-05

      This bug still exists in JDK1.2beta3-L.

      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: