Swing thread performance in linux

Hello,
I am writting very small swing application for learning students...
There is Robot object(s) which can walk through Panel and draw lines...
But I have there some performance problems with threads in linux...
In Windows is everything ok... but not in linux...
code is very short... every Robot object has reference to PaintPanel
extends JPanel. When robot do forward method, it paints DrawableLine.
Painting is following through PaintPanel.drawShape(final Drawable shape)
In MainFrame is little example method runRobots() which draw some
pictures. When I added this method (runRobors) to thread, it is going
very slow on linux...
sources are here:
http://homer.dactos.com/~hlavki/robot.zip
thanks, miso

camickr,
Good call. that was what it wanted. Runs like a scalded dog without any flicker at this point.
Wrapped the calls that would result in adding a ThreadMonitor, Removing a ThreadMonitor or updating a ThreadMonitor with
SwingUtilities.invokeLater(new Runnable(){
    public void run(){
        // do something here
}) ;and the ui is very well mannered now.
There is one gotcha for anyone who comes along after and reads this thread. This change increases the app to use more heap space and at full throttle I was able to bring the application to its knees.
Just something to be aware of.
camickr, once again thank you.
PS.

Similar Messages

  • Best methods to speed up and increase performance of Linux?

    I would like this thread to be dedicated to various speed up techniques and performance tweaks for Linux and especially arch.
    K.Mandla offers quite a bit of interesting tweaks in the guide "Howto: Set up Hardy for speed", most of it applies to all linux distros.
    http://kmandla.wordpress.com/2008/05/04 … for-speed/
    If you have come across any interesting information relating to getting faster and better performance from Linux please do not hesitate to post. Thanks.

    PrimoTurbo wrote:
    I would like this thread to be dedicated to various speed up techniques and performance tweaks for Linux and especially arch.
    K.Mandla offers quite a bit of interesting tweaks in the guide "Howto: Set up Hardy for speed", most of it applies to all linux distros.
    http://kmandla.wordpress.com/2008/05/04 … for-speed/
    If you have come across any interesting information relating to getting faster and better performance from Linux please do not hesitate to post. Thanks.
    You will most likely end up wasting a lot of time for very little gain.
    There are no miracle solutions, you either use faster apps or buy faster hardware.
    The tweaks which are truly interesting without major drawbacks usually make their way on a default system, one way or another.
    For example, for directory index on ext3 :
    http://wiki.archlinux.org/index.php/Ext … ystem_Tips : "Note: Directory indexing is activated by default in Archlinux via /etc/mke2fs.conf"
    So if you want an advice, there are areas more interesting to explore, like programming for instance. You might end up having the capability to really improve apps performance, or write your own lighter alternatives.

  • Killing a Swing thread

    Hello,
    How can I kill a Swing thread? For example the program below would never exit. Sure you can type System.exit(0) which would exit anything, but what are the other solutions?
    I tried putting chooser = null;
    System.gc();in the end of main() but this won’t work.
    To formulate my question better - how would I kill a thread I do not have complete command of (i.e. I can’t do usual do/while thread stopping)?
    Big thanks in advance.
    public class SwingLiveTest{
        public static void main(String[] args) {
            JFileChooser chooser = new JFileChooser();
            if (chooser.showSaveDialog(null) != JFileChooser.APPROVE_OPTION) return;
            File file = chooser.getSelectedFile();
            System.out.println(file);
            /*chooser = null;
            System.gc(); */

    You can't kill any Thread like this, at least not those where there is no method to call.
    It is possible to cause a Thread to stop, call the stop method, however this is not the recommended approach for very good reasons (Read the JavaDocs for java.lang.Thread.stop() method to see why.
    It should be possible, once you have obtained a reference to the Thread you wish to stop, to call interrupt() on that Thread.
    This is not guaranteed to work because you are dependent on the implementation of the Thread class you are manipulating or the Runnable that the Thread instance is currently running.
    There may be classes in the com.sun packages which can aid you with this problem, this is where Sun usually sticks undocumented implementation however these packages are not officially supported and there is no guarantee that classes you use in one VM are available in another, in particular when the VM you are using is not a Sun VM.

  • In this case, can I modify swing GUI out of swing thread?

    I know the Swing single thread rule and design (Swing is not thread safe).
    For time-consuming task, we are using other thread to do the task and
    we use SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater (or SwingWorker) to update Swing GUI.
    My problem is, my time-consuming task is related to Swing GUI stuff
    (like set expanded state of a huge tree, walk through entire tree... etc), not the classic DB task.
    So my time-consuming Swing task must executed on Swing thread, but it will block the GUI responsivity.
    I solve this problem by show up a modal waiting dialog to ask user to wait and
    also allow user to cancel the task.
    Then I create an other thread (no event-dispatch thread) to do my Swing time-consuming tasks.
    Since the modal dialog (do nothing just allow user to cancel) is a thread spawn by
    Swing event-dispatch thread and block the Swing dispatch-thread until dialog close.
    So my thread can modify Swing GUI stuff safely since there are no any concurrent access problem.
    In this case, I broke the Swing's suggestion, modify Swing stuff out of Swing event-dispatch thread.
    But as I said, there are no concurrent access, so I am safe.
    Am I right? Are you agree? Do you have other better idea?
    Thanks for your help.

    If you drag your modal dialog around in front of the background UI, then there is concurrent access: paint requests in your main window as the foreground window moves around.

  • Thread dump under linux

    Hi John,
    My computer(celeron 2.2ghz ,1 GBRAM) is far too slow than turtle if creator is opened. I have changed memory setting but dint help. I am very frustrated, I takes ages to navigate or do anything.
    Could you please outline the steps to generate the thread dump under LINUX, I know u have posted them before but they are for windows.
    Any help will be greratly appreciated.
    Cheers
    kush

    Hi,
    Take a look at the message posted by John regarding the steps to generate the thread dump under linux in the following thread:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50464
    Thanks,
    RK

  • Fault encountered in running a Java Swing Appl on a Linux Platform

    hello friends,
    problem:
    Whenever i aim to run any of the Java AWT/ Swing Applications (that produce a graphical o/p), on a RED HAT LINUX 9.0 platform i get the error as attached (error.txt)..the programs get compiled but doesnt get executed and do not produce any graphical o/p. Can anyone plz suggest a solution for this..?
    Other non-graphical applications and applets run smoothely.
    Expecting a help in this regard from any kind soul.....
    take care.
    this is what the error.txt file shows.......
    [sum@localhost graphics]$ java JFrameExample > error
    returned
    end
    Exception in thread "main" java.lang.VerifyError: verification failed at
    PC 123 in
    javax.swing.JComponent:getListeners((Ljava.lang.Class;)[Ljava.util.EventListener;):
    incompatible
    return type     at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String)
    (/usr/lib/./libgcj.so.3)   at 0x4025bc8e:
    java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
       at 0x4025d6b6: java.lang.LinkageError.LinkageError(java.lang.String)
    (/usr/lib/./libgcj.so.3)
       at 0x402691b6: java.lang.VerifyError.VerifyError(java.lang.String)
    (/usr/lib/./libgcj.so.3)
       at 0x4023f5a9: _Jv_BytecodeVerifier.verify_fail(byte, int)
    (/usr/lib/./libgcj.so.3)
       at 0x40232c51: _Jv_BytecodeVerifier.verify_instructions_0()
    (/usr/lib/./libgcj.so.3)
       at 0x40231857: _Jv_VerifyMethod(_Jv_InterpMethod)
    (/usr/lib/./libgcj.so.3)
       at 0x40229ae4: _Jv_PrepareClass(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class)
    (/usr/lib/./libgcj.so.3)
       at 0x4024646c: java.lang.Class.initializeClass()
    (/usr/lib/./libgcj.so.3)
       at 0x402296af: _Jv_ResolvePoolEntry(java.lang.Class, int)
    (/usr/lib/./libgcj.so.3)
       at 0x40230827: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
       at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
       at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
    (/usr/lib/./libgcj.so.3)
       at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw,
    _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
       at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw,
    void) (/usr/lib/./libgcj.so.3)
       at 0x4038305c: ?? (??:0)
       at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main()
    (/usr/lib/./libgcj.so.3)
       at 0x402ad02d: gnu.gcj.runtime.FirstThread.run()
    (/usr/lib/./libgcj.so.3)
       at 0x4024fc4c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
       at 0x4021c8ac: _Jv_RunMain(java.lang.Class, byte const, int, byte
    const, boolean) (/usr/lib/./libgcj.so.3)
       at 0x08048910: ?? (??:0)
       at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
       at 0x080486c1: ?? (??:0)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I suspect your distribution came with some open source and half-assed implementation of Java that just doesn't work. Remove that Java from your path (or uninstall it entirely). Then, download and install Sun's Java (JRE) from http://java.sun.com/j2se/1.5.0/download.jsp.

  • Different Swing behaviour in Windows & Linux

    Hi ,
    I have an IDEFIX Application(J2ee) whose Client is built on Java Swing.
    Addtionally this application had to invoke an 3rd party Software.
    On invoking the 3rd party Software from this application & on load
    of the 3rd party Software.The Swing Behavior of the client
    of IDEFIX Application behaves in a different way . for Eg : the
    Disabled buttons are not visible ,enterlly the view becomes somewhat
    differrnt & distorted.
    IDEFIX Application invokes the 3rd party s\w through a Thread.
    But The main problem is that it works properly in Linux ,
    The problem arises in Windows system.
    If any body has the solution Please tell
    Regards,
    Sajeev

    The glitchs happen when I run the code in windows. First off when I press the quit button in linux the actionlistener picks up that I hit the quit button and makes a new instance of QuitPopup which simply sets itself to visible. I'm using the default layout manager and on linux the popup window simply comes up in a seperate JFrame and I can click the buttons on it etc..
    In Windows, using the same code when I press the quit button I see the QuitPopup instance come up but it is like it is drawn ontop of the first JFrame. There is no border and the buttons inside of the QuitPopUp() JFrame don't work. When you move your mouse over them the buttons in the original JFrame appear to "come through" and erase the pop-up's graphics.
    For borders on the first JFrame I'm using a no-border full-screen JFrame. For the popup I'm using the default border.
    I'm using the default font on both.
    Also For the fullscreen JFrame in the background I'm using layeredPanes ontop of the JFrame. I have placed buttons inside of the layeredPanes and when I click on them the image I have set for the rollovericon action keeps flashing after I click on it. NOTE: the flashing buttons ONLY happens in windows.
    Do you think trying a different layout manager rather than the default would work better?

  • How does deadlocking happen when not updating UI on swing thread?

    It looks like the 2 objects that cause the deadlock are the RepaintManager and the JComponent.LOCK object...but I can't really find a scenario where this happens in the code.
    Can anybody shed some light on this?

    Basic rule of thumb:
    If you can't guarantee that your code will run on the AWT-Event thread then wrap your calls in a SwingUtilities.invokeLater() call (or its cousin invokeAndWait()).
    Basically this looks like:
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    // put your gui updating code here
    There are two ways to make something thread safe:
    1) Guarantee calls will always come from the same thread
    2) Synchronized shared objects.
    Swing chose choice 1 since choice 2 would be two big of a performance hit. The thread it uses is the AWT-Event thread. The invokeLater call tosses your Runnable object at the end of the Event Queue. The AWT-Event thread pops a Runnable off the Event Queue processes it and then repeats.
    As to specifically whats happening, I can't say without more information. Really you should go back and make sure all your Swing calls are on the AWT-Event thread. That should solve your current problem and prevent future problems.

  • How do I increase the thread limit on Linux?

    OS: Linux (or Sun Linux)
    Kernel: 2.4.9-31enterprise
    Memory: 2GB
    CPUs: 2
    Java: 1.4.1_01
    I have a dual processor Cobalt LX50 and I am running
    into a thread limit with Java. No matter what I do
    with the Java JVM parameters (heap and stack), I
    cannot get any more than 949 threads. My "top" and "vmstat" output
    shows that I am no where near my memory capacity.
    Below is a simple Java program (28 lines long) I have
    used to test this limit. My question is simply how do
    I go about increasing this limit. Is there some kernel
    parameter I can set or maybe have to recompile into
    the kernel? My /proc/sys/kernel/threads-max is 16383.
    I do not believe my ulimit settings are the problem,
    but I will post them anyway. The problem also occurs
    on non-Cobalt (plain old PCs) uniprocessor machines
    maxxing at about 1018 threads. The other interesting thing is that when I run the same program through the Kaffe VM with -Xms64M and -Xmx512M I do not run into the thread limit problem. Does anyone know what I need to change to get my thread limit up? Also, rewriting the way the program uses threads is not an option.
    [root]# ulimit -a core file size (blocks) 0
    data seg size (kbytes) unlimited
    file size (blocks) unlimited
    max locked memory (kbytes) unlimited
    max memory size (kbytes) unlimited
    open files 1024
    pipe size (512 bytes) 8
    stack size (kbytes) 8192
    cpu time (seconds) unlimited
    max user processes 8191
    virtual memory (kbytes) unlimited
    /*******************************Sample java program
    testing thread
    limits***********************************************/
    import java.util.Timer;
    import java.util.TimerTask;
    public class Reminder {
    Timer timer;
    static int cnt;
    public Reminder(int seconds) {
    timer = new Timer();
    timer.schedule(new RemindTask(), seconds*1000);
    class RemindTask extends TimerTask {
    public void run() {
    System.out.println("Time's up!");
    timer.cancel(); //Terminate the timer thread
    public static void main(String args[]) {
    System.out.println("About to schedule task.");
    cnt = 0;
    while (true) {
    new Reminder(90);
    System.out.println("Thread #" + ++cnt + "
    scheduled.");

    Confer also:
    http://forum.java.sun.com/thread.jsp?forum=37&thread=358276

  • Restoring minimized swing app performance

    Holla,
    i am writing a swing application and there is a performance problem
    waking up the app: i mimimize the application (send it to the WIndows taskbar) then i
    start other 'large' programs like word, my email client, or the IDE. when i maximize
    the application now, it needs about 5-15 secounds to paint and 'come to live again'.
    during this period of time the frame stays gray. this is poor response time..
    I've seen other swing applications doing similar things. Netbeans for example.
    Does anybody know the reason for this behaviour?
    -mike

    This question is even more confusing then the one you asked before. Do you understand how PHP works because your question appears to have nothing to do with PHP whatsoever... unless you are confused which appears to be the case.
    Could you describe the flow of your application a little please? That might be helpful. Like your user does X then Y happens etc. Rather than configure the PHP script which makes no real sense at all... because that sounds like a script editor which is fine in and of itself but is not related to a question about browsers Java or otherwise.
    If you don't like this answer than I will say this. Yes it is possible in Java but not on alternate Tuesdays and as always, beware the classpath.
    Good luck.

  • Swing/Threads, changing the GUI

    Hey all, I have a question related to the java swing class, and manipulating a GUI which is something that I have never done before. Basically I have a threaded Listener class which returns a status boolean. Related to that status, I have a Jlabel which is supposed to display green if the status is true, and red if the status is false, however it is not working correctly. Below is my code, and I would appreciate some help if anyone has a fix, or better way to do this... Thanks in advance
    //Listener Class
    public class Listener extends Thread{
         private boolean isGood = false;
         public Listener(//...) {
         public void run()
              // does stuff here that sets the isGood var
         public bool getIsGood()
              return this.isGood;
    //GUI
    public class Visualizer {
         private static Listener listener;
         public Visualizer(Listener listener){
              this.listener = listener;
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
         private static JFrame frame;
         private static JLabel status;
         public static void createAndShowGUI() {
    //Create and set up the window.
    frame = new JFrame("Window");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    status = new JLabel("Listener... ");
    status.setOpaque(true);
    status.setBackground(Color.RED);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    frame.setSize(new Dimension(204, 115));
    frame.setContentPane(status);
    listener.start();
    while(true){
         boolean isGood = listener.getIsGood();
    if(isGood){
    status.setBackground(Color.GREEN);
    else{
    status.setBackground(Color.RED);
         try{
              Thread.sleep(1000);
         }catch(Exception E){
              E.printStackTrace();
    I purposely left out some of the code because I wanted to make it simpler to follow. Essentially this is what is going on, and hopefully someone can point out why its not working and how to fix it. Thank you for reading this.

    thanks for the advice Petes, I was looking for the code tag before but didnt see it. I have created an SSCCE, and I apologize for not making it earlier. Here is the code. The threads seem to be getting stuck, and the label doesnt alternate between red and green as it should. Let me know if you need anything else:
    package simplified;
    public class Main{
         public static void main(String[] args) {
              Listener theListener = new Listener();
              theListener.start();
              Visualizer theView = new Visualizer(theListener);
    //Listener Class
    public class Listener extends Thread{
         private boolean isGood = false;
         public Listener() {
         public void run(){
              if(this.isGood == true){
                   this.isGood = false;
              else{
                   this.isGood = true;
              try{
                   this.sleep(1000);
              }catch(Exception e){
                   e.printStackTrace();
         public boolean getIsGood(){
              return this.isGood;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.Dimension;
    public class Visualizer {
         private static Listener listener;
         public Visualizer(Listener listener){
         this.listener = listener;
         javax.swing.SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                   createAndShowGUI();
         private static JFrame frame;
         private static JLabel status;
         public static void createAndShowGUI() {
              //Create and set up the window.
              frame = new JFrame("Window");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              status = new JLabel("Listener... ");
              status.setOpaque(true);
              status.setBackground(Color.RED);
              //Display the window.
              frame.pack();
              frame.setVisible(true);
              frame.setSize(new Dimension(204, 115));
              frame.setContentPane(status);
              while(true){
                   boolean isGood = listener.getIsGood();
                   if(isGood){
                        status.setBackground(Color.GREEN);
                   else{
                        status.setBackground(Color.RED);
                   try{
                        Thread.sleep(1000);
                   }catch(Exception E){
                        E.printStackTrace();
    }

  • Swing Threads

    Does anybody know how the threads in a swing application are organized. I noticed, that when i start a swing application more then 10 threads are created. Furthermore, when the "main" thread is terminated after showing the main window (a JFrame window), two windows are displayed. When the main-thread is ran in a loop (while (true) {try{Thread.sleep(100);}catch(Exception x){}), only one window is displayed. So, even if the main thread does nothing, it's necessary.
    Furthermore, i realized that, when starting other threads out from the main thread, on some win 2000 systems the threads are properly terminated but the associated handles are not freed - this leads to a "handle leak" after a certain time (48 hours). If the threads are started with invokeLater out from the main thread, then the handles are freed properly when the thread terminates.
    Does anybody know how these facts can be put together to get a bigger whole ?
    Thanks a lot.
    Stephan Gloor
    Switzerland

    hi,
    the rule is:
    swing components are not thread-safe except some, and therefore they should only be changed from within the event dispatch thread. this can be accomplished using the methods invokeLater(Runnable) and invokeAndWait(Runnable) in class javax.swing.SwingUtilities.
    best regards, Michael

  • Java 1.4.2 swing (setBounds) performance problem

    Hi,
    We were having performance problems with swing ever since we moved to java 1.4.2 and we finally switched back to 1.4.1. However, we have now traced the problem to JVM and the following simple code demonstrates it.
    I would like to hear from others who faced or solved this.
    When the setBounds is called, there is visible delay in checking/unchecking boxes.
    Without it, the performance is good. The performance is good with 1.4.1 as well.
    Code sample for JComponentTest :
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class JComponentTest extends JFrame {
    public final static int MAX_JLBL = 50;
    private static double _clicked = 0.0;
    // pop up window
    private JPanel _configPanel = new JPanel();
    private JCheckBox[] _configArray = new JCheckBox[MAX_JLBL];
    private JButton _toggle = new JButton("update");
    public JComponentTest() {
    setTitle("JLabelTest");
    // setBounds causes performance problems
    setBounds(1278, 4, 203, 361);
    getContentPane().add(_configPanel);
    for(int i=0; i<_configArray.length; i++){
    _configArray[i] = new JCheckBox("cb"+i);
    configPanel.add(configArray);
    _configArray[i].addActionListener(new ConfigListener());
    configPanel.add(toggle);
    _toggle.addActionListener(new ConfigListener());
    setVisible(true);
    // listenres
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(1);
    } // end constructor
    public static void main(String[] args) {
    new JComponentTest();
    /** This class implements the ActionListener and being used for configuration
    * fields.
    private class ConfigListener implements ActionListener {
    public void actionPerformed(ActionEvent ae) {
    boolean selected = (_clicked%2 ==0);
    if (selected)
    for(int i=0; i<_configArray.length; i++)
    ((JCheckBox)_configArray[i]).setSelected(true);
    else
    for(int i=0; i<_configArray.length; i++)
    ((JCheckBox)_configArray[i]).setSelected(false);
    _clicked++;

    weebib
    We are using Windows XP , Nvidia graphics card, with Multiview. I hope the problem is not specific to the platform.
    It is reproducible with 1.4.2 and absent in 1.4.1
    camickr
    I am new to this forum. didn't know about code blocks.

  • Solaris 10 NFS performance on Linux running ws3 update 3

    Hope someone can help me sort out this problem.
    Dear Support.
    We are having a Solaris/Sparc file server running Solaris 10. The Solaris machine act as a NFS file server. We encounter very poor NFS performance when copying files to and from a filesystem via Linux NFS
    I have set up a very simple test scenario. Created a tar file, size around 3 GB. The file is sitting on a SAN system. The file it self is created on a Solaris 10 UFS filesystem.
    Solaris E240 Solaris 8 NFS, GB interface copy to and from the same disk via NFS
    timecp /seis/seis600_new/usr.tar /seis/seis600_new/new1.tar
    real 2m18.91s
    user 0m0.11s
    sys 0m29.72s
    IBM/AMD 64 bit Linux WS3 U5, GB interface NFS to and from the same disk via NFS.
    time cp /seis/seis600_new/usr.tar /seis/seis600_new/new1.tar
    real 6m24.670s
    user 0m0.130s
    sys 0m21.860s
    Also run the test on other Linux boxes with similar results?
    The funny part of this is that I can reproduce the performance problem on other SUN systems among the SUN Blade 2000 with 8 GB Ram
    Let me wrap up.
    Always bad NFS performance when using NFS between Solaris NFS server and Linux client.
    Not always bad performance when using NFS between Solaris server and clients.

    It's been a while since I was doing linux->solaris nfs, so bear with me as I clear out the cobwebs.
    First things to check: Mount options for the nfs mount to the server.
    Which versions of nfs are you using?(v2, v3?) Solaris uses version 3 mounts by default.
    What's your wsize and rsize for reads and writes?
    I believe linux is limited to using 8k r/w block sizes. Solaris will let you use r/wsize up to 32k in nfsv3, which would really help with larger data transfers.
    nfsv3 has a number of performance enhancements over v2, so give that a shot with a larger block size.
    nfsvers=3,wsize=8192,rsize=8192,nolock,intr
    Also experiment with your locking options, that might help some.
    NFS has always been a fairly weak point for linux.
    A few links for reference:
    http://www.scd.ucar.edu/hps/TECH/LINUX/linux.html
    http://nfs.sourceforge.net/
    Cheers && good luck,
    fptt.

  • Proposal for a sticky thread "Performance of SAP standard"

    Hello,
    in this form there are many questions about your programs, selects function modules but what about the SAP standard programs, they are not always the best performing things on your system. What do you think about a thread with improvements of SAP standard programs?
    Ok, that should be the job of SAP, but sometimes everybody needs a little kick.
    So this thread should collect suggestions of improvements of SAP coding. These suggestions should be very precise, so SAP should implement them easily. I'm pretty sure, everybody will find some not optimized code during debugging, learning, ... .
    So , lets start with an example
    Function module CO_SF_HEADER_GOODS_ISSUE
    SELECT SINGLE * FROM caufv WHERE aufnr EQ aufnr.
    There is no need for select *, because only the fields
    autyp
    loekz
    objnr
    gamng
    gmein
    rsnum
    are needed during the FM.
    so lets improve the code
    select single aufnr loekz autyp gamng gmein rsnum
    from caufv into (wa_caufv-aufnr,
                      wa_caufv-loekz,
                      wa_caufv-autyp,
                      gamng, gmein, rsnum)
    With this code we can also kill three moves in the last lines.
    MOVE: caufv-gamng TO gamng,
          caufv-gmein TO gmein,
          caufv-rsnum TO rsnum.
    That was easy, on my testsystem it is 38% less database-time for the select and a little for the three moves.
    What do you think?
    Matthias

    Not sure I'm on board,  I doubt SAP will take suggestions for modifying their code via a forum post, I think it is best to go thru OSS.
    Anyway, a little story for ya.  We had a program which was sort of like CO41(collective planned order conversion), but was custom because we needed to include characterisics, so we have this program that gets all of the planned orders and then does CO40 transaction over each one.  This worked in the begining, but after some time the runtime was extremely bad, like hours long.  So I did some investigation and found the exact SELECT statement deep inside of CO40, and found that the WHERE clause was not written in such a way that was good for my company.  I contacted OSS, and pointed them to the exact place in the code that was giving us a problem.  I told them that the one line in the WHERE clause needed to b commented out, then the performance would be much better.  They came back after a number of days, and said, the SELECT statement was written in such a way that it works for all business processes.  At my company, our business process dictated that the one line in the WHERE clause was not necessary and even hurting our performance.  Anyway, they said they would not issue a change for us and that we either had to hack it ourselves or totally redo the way our task list groups where set up.  The problem was is that we had a couple task list groups, with thousands and thousands of materials assign to it. This was the problem.  So I hacked the standard program, and it actually shaved of 3 hours of processing time.
    Regards,
    Rich Heilman

Maybe you are looking for

  • How can I restore my new Macbook pro to Factory setting?

    How can I restore my new Macbook pro to Factory setting?

  • Permission issue - local vs OD user

    I setup server with an admin user called "mrjason".  Later in setting up folders, I created a new sharepoint (from wazmac.com setup guide for schools) for all teachers folders, called t_home. I successfully setup other teachers, including a OD-based

  • TV on MacBook Pro

    How do I put HD video from my HD Comcast cable box to my MacBook Pro? This is very important to me.

  • Horizontal Scroll for Apex 4

    I need horizontal scroll for a page in Apex 4. I saw an old thread about horizontal scroll using Apex 3.2. Below is the link for that thread where vee gave some plugin code to achieve this scrolling: horizontal bar Scroolling. I saved the code in the

  • How can I use iMessage in iPad 2

    How can I use iMessage in iPad 2?