Swing performance win32 vs. linux

Hello,
I was written small java application, which contains objects of type Robot.
Robot r1, r2, r3;
every robot draws on one PaintPanel in one thread...
On win32 platform is everything OK, but on linux it is sometimes very
slow...
I am using SwingWorker, but I am not sure, if good...
Sources are here:
http://hlavki.no-ip.org/~hlavki/robot.zip
sources contains netbeans 4.1 projects files...
There are 3 buttons:
Thread - robots are moving in separate thread
No Thread - robots are moving in main thread
Close - close application
When I click "No Thread" everything is good in linux too...
but in "Thread" there are time leaks in linux...
thanks, miso

I don't know the exact answer, but I'm sure it has much more to do with thread scheduling and jdk implementation of threading than any actual performance metric

Similar Messages

  • What is Swing Performance on Unix/Linux like (Compared to Windows)?

    I have only used Swing on Windows, and only read about people using it on windows, and the performance is known as less than great. So i was wondering, is the performance bad on Unix/Linux/Mac OS X as well?

    Thanks! So it appears that it's basically the same. I have to say that while the performance may not be the best, and from what I hear the implementation is not the most brilliant (but I'm not sure), in my opinion the architecture and API are BRILLIANT! Never before has creating a GUI (and especially cross-platform) been so clean! No gotchas in layout, it does exactly what it says it will, and across all the platforms I've used (windows, palm, pocket pc). Amazing.

  • Can't enable performance pack on Linux

    I am trying to enable the performance pack on Linux 7.1 with
    WebLogic Server 5.1 sp 12, but see the following in the log
    when I start the server:
    Unable to load performance pack, using Java I/O.
    I have tried setting the java.library.path to point to the linux
    .so folders (per BEA documentation), but still does not seem to work.
    Any help would be greatly appreciated. Thanks!

    If memory serves, on Windows it's $PATH.
    On Solaris and Linux, it's $LD_LIBRARY_PATH
    On HP-UX, it's $SHLIB_PATH
    -- Rob
    Cameron Purdy wrote:
    I am trying to enable the performance pack on Linux 7.1Did you mean RedHat 7.1?
    WebLogic Server 5.1 sp 12, but see the following in the log
    when I start the server:
    Unable to load performance pack, using Java I/O.Sounds like it can't find the library or one of its dependencies. I can't
    remember if that's PATH or LIBPATH or LD_LIBRARY_PATH or what ....
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Joe Casotti" <[email protected]> wrote in message
    news:[email protected]..

  • Performance Pack for Linux

    Hi all,
    I am trying to install Weblogic 4.5.1 on Red Hat Linux 6.1
    When I set the weblogic.system.nativeIO.enable to true within the
    weblogic.properties file, I receive an exception:
    java.lang.UnsatisfiedLinkError: no muxer in shared library path
    (libmuxer.so)
    I tried looking through the installation documentation and was unable to
    find anything related specifically to using the performance pack under Linux
    (there was information specific to AIX and Solaris, however).
    So I guess my question is: Is the performance pack supported for Linux? If
    so, what might I have to modify in order for it to work correctly? Thanks-
    Matt Groch

    Andrew Nishigaya wrote:
    Hi,
    I just saw your post about there being no Linux NativeIO performance
    pack. Is there any planned?Yes.
    If so, could you provide a general
    timeline?
    It should be available in the Denali (5.1) release of WLS or shortly
    thereafter. Denali is GA at the end of March.
    >
    BTW, Can you enlighten me as to what the libWeblogicLinux1.so file do
    that is in the linux directory?I believe that it is some platform-specific debug code that we include.
    -- Rob
    We were hoping that this was the
    NativeIO pack, but I guess we were wrong.
    Any help would be appreciated!
    -- nori
    Srikant Subramaniam wrote:
    Unfortunately, we don't support the performance pack for linux at this point in
    time.
    Srikant.
    Matthew Groch wrote:
    Hi all,
    I am trying to install Weblogic 4.5.1 on Red Hat Linux 6.1
    When I set the weblogic.system.nativeIO.enable to true within the
    weblogic.properties file, I receive an exception:
    java.lang.UnsatisfiedLinkError: no muxer in shared library path
    (libmuxer.so)
    I tried looking through the installation documentation and was unable to
    find anything related specifically to using the performance pack under Linux
    (there was information specific to AIX and Solaris, however).
    So I guess my question is: Is the performance pack supported for Linux? If
    so, what might I have to modify in order for it to work correctly? Thanks-
    Matt Groch
    Andrew Nishigaya Chief Technology Officer and Founder
    Miradi, Inc. Believe. Create. Collaborate.
    Soquel, CA [email protected]
    (831) 477-0561 http://www.miradi.com

  • Performance pack on linux

    I tried to install performance pack on Linux, the LD_LIBRARY_PATH is set and pointed to the correct location, but I got the following message when start weblogic server:
    <Posix Performance Pack> Could not initialize POSIX Performance Pack.
    <Performance Pack> Unable to load performance pack, using Java I/O.
    We use Sun's 1.3 java(it could use native thread)
    Many Thanks!!!!

    If you are on SP 7 or 8 the performance pack doesn't work. Have you tried this on 6 or less?
    -Jeff Ward
    "Jean XU" <[email protected]> wrote:
    >
    I tried to install performance pack on Linux, the LD_LIBRARY_PATH is set and pointed to the correct location, but I got the following message when start weblogic server:
    <Posix Performance Pack> Could not initialize POSIX Performance Pack.
    <Performance Pack> Unable to load performance pack, using Java I/O.
    We use Sun's 1.3 java(it could use native thread)
    Many Thanks!!!!

  • Swing performance question: CPU-bound

    Hi,
    I've posted a Swing performance question to the java.net performance forum. Since it is a Swing performance question, I thought readers of this forum might also be interested.
    Swing CPU-bound in sun.awt.windows.WToolkit.eventLoop
    http://forums.java.net/jive/thread.jspa?threadID=1636&tstart=0
    Thanks,
    Curt

    You obviously don't understand the results, and the first reply to your posting on java.net clearly explains what you missed.
    The event queue is using Thread.wait to sleep until it gets some more events to dispatch. You have incorrectly diagnosed the sleep waiting as your performance bottleneck.

  • 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?

  • Database Performance Comparison on Linux n WindowNT

    Hi Everybody,
    We have an Application running on Oracle7.3 n WindowNT. Now we are shifting this to Oracle8i (Rel 2). OS platform is not yet
    decided. We are asked to submit a performance report of Oracle8i on Linux and Oracle8i on WindowsNT. How can we make a comparison of Oracle8i on WinowsNT n Linux(RedHat6.2).
    Also if any body knows any web site related to this, please let me know the same also.
    Thanks n Regards,
    Hari
    null

    I did something like that a little while ago, so here's a summary of what I did and what I learned:
    I also wanted to select a server OS for a data warehouse, and I did some head-to-head comparisons (same machine, just booted into different OS varieties, loading the same data). I used Red Hat 6.0 and 6.2, SuSE 6.3 and 6.4, and Mandrake 7.0 and 7.1, plus NT4.
    Overall, I found that any Linux outperformed NT--but not by enough to make that a major factor in selection. Subjectively, I also found that everything I did was just a little bit less straightforward, a little bit less convenient in Red Hat than it was in any other Linux distribution I tried--but again, not necessarily enough to make a big difference in selection.
    I also had more crashes and lockups with NT than I did with any Linux, but that may be more a reflection of my skill at administering NT vs. my skill at administering Linux.
    I'd say it's definitely worth your while to evaluate Linux, and I'd suggest that you have a look at several Linux distributions while you're at it. Personally, I like SuSE and dislike Red Hat.

  • Performance issue in linux while using set with URL object

    Hi,
    I am facing performance issue while using Set(HashSet) with URL object on linux. But it is running perfectly on windows.
    I am using
    set.contains(urlObject)
    Above particular statement is taking 40 sec on Linux, and only a fraction of ms on windows.
    I have checked the jre version on both OS. It is the same version (jre6)
    on both the OS.
    Could anyone please tell me what is the exact reason, why the same statement is taking more time on linux than windows.
    Thanks & Regards
    Naveen

    jtahlborn wrote:
    I believe the URL hashCode/equals implementations have some /tricky behavior which involves network access in order to run (doing hostname lookups and the like). you may want to either use simple Strings, or possibly the URI class (i think it fixed some of this behavior, although i could be wrong).The second new thing I have learned today. I was wrong in reply # 1 because looking at the URL code for 1.6 I see that the hash code is generated from the IP address and this has a lazy evaluation. Each URL placed in a HashMap (or other hash based collection) requires a DNS lookup the first time the hash code is used.
    P.S. 40 seconds does seem a long time for a DNS lookup!
    Edited by: sabre150 on Feb 13, 2008 3:40 PM

  • Very poor performance on oracle linux 6.3 on virtual-box 4.2

    Dear all,
    I installed an oracle linux 6.3 on vbox VM (2 gb RAM, 20 gb disk): the installation took a long time and after, I faced poor performance and big latency.
    One bug reported:
    WARNING: at kernel/time/clockevents.c:47 clockevent_delta2ns+0x79/0x90()
    Hardware name: VirtualBox
    Modules linked in:
    Pid: 1, comm: swapper Not tainted 2.6.39-200.24.1.el6uek.x86_64 #1
    Call Trace:
    [<ffffffff8106ad1f>] warn_slowpath_common+0x7f/0xc0
    [<ffffffff8106ad7a>] warn_slowpath_null+0x1a/0x20
    [<ffffffff8109d649>] clockevent_delta2ns+0x79/0x90
    [<ffffffff819b8427>] calibrate_APIC_clock+0xeb/0x2f6
    [<ffffffff819b874c>] setup_boot_APIC_clock+0x59/0x7e
    [<ffffffff819b8336>] APIC_init_uniprocessor+0xfc/0x102
    [<ffffffff819b60fc>] smp_sanity_check+0x69/0x145
    [<ffffffff819b62fd>] native_smp_prepare_cpus+0x125/0x215
    [<ffffffff819a776b>] kernel_init+0x1c9/0x2a8
    [<ffffffff8150edc4>] kernel_thread_helper+0x4/0x10
    [<ffffffff819a75a2>] ? parse_early_options+0x20/0x20
    [<ffffffff8150edc0>] ? gs_change+0x13/0x13
    I upgraded memory to 4 gb RAM but it was on vain
    Please, any idea so far ?
    Best Regards

    I can confirm that there is no issue with Virtualbox 4.2 and Oracle Linux 6.3. I use it all the time. Performance should be near native and some aspects like disk I/O may even be faster. Your problem could be insufficient hardware, like missing x86_64 or hardware virtualization support. However, like rukbat wrote, this is not the right forum to discuss Virtualbox and your computer hardware here. I suggest to start with the Virtualbox documentation to verify your hardware is sufficient.
    https://www.virtualbox.org/manual/ch10.html#hwvirt
    https://www.virtualbox.org/manual/ch14.html

  • Performance Oracle for Linux OS/390

    Hi all,
    somebody know some issues in Oracle for Linux OS/390..?
    instalation, performance, etc.
    Thanks and advanced.
    Best regards....

    Hi Shane,
    Oracle has only released client software for Intel Macs, but not the full database server software. If you want to run the Oracle database on your Mac, I suggest installing on a supported OS running in a virtual machine (VMware Fusion, Parallels, or VirtualBox). Michael McLaughlin has a very thorough post on his blog about using an Intel Mac as a client for a database server running in VMware Fusion.
    Regards,
    John P.
    http://only4left.jpiwowar.com

  • Help ! Swing Performance tuning

    Hi All
    what if I go on adding n number of components to the same location of a container without removing the previouly added component to the same location? the component count goes on increasing obviously but is there any performance issue when I remove the earlier one and then add the new one to it?
    e.g. If my JFrame contains one center JPanel and after every 10 seconds i want to change the center panel. If i just do it by setting earlier panel to visible false and add new panel to the center won't it increase the size of component list maintained by the container? does removing earlier component add then adding new one give better results over this?
    Shailesh

    Shure you get better performance, when removing not-used panels. Furthermore, swing-panels are very memory-consuming.

  • Gencon causes erratic performance on SMP linux server

    -----Problems:
    1. Erratic performance.
    2. GC logs show only half of the GC pause times.
    -----Symptoms:
    Long pause(s) in application response time. GC log output shows GC collections lasting about half the duration of the application pause. Our testing resulted in pauses which lasted up to 90 seconds during which few or no transactions were processed by the workload.
    -----Cause:
    Gencon apparently does not work well on an MP Linux system
    -----Workaround:
    Use the parallel gc option on MP systems.
    -----System Specs:
    Red Hat 3.1 AS
    Xeon MP (quad)
    Standalone java application on JRockit.
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1032-linux-ia32, Native Threads,

    David,
    Thank you for your response. I believe the pauses are GC related, though.
    The application is multithreaded and can be run in multiple instances as well. This behavior effects one entire process. That is, all threads in one process stop producing for several seconds (up to 90 as I mentioned in my original post). Other instances of the application on the same server continue to function normally.
    If the GC option is changed to parallel then this pause behavior does not occur. Changing the GC option was made in lab conditions and was the only change made. Reverting to gencon, of course, reliably reproduces the problem.
    Additionally the timing of the longest GC pause in the GC log correlates with the timing of the transactional drop in the application's log. Again, as I mentioned in the first post, the time of the GC pause is half of the time of the unresponsive period in the application. Therefore, even if the application is causing half of the delay, a 45 second GC pause for a 1.5 GB heap is cause for review.
    Thank you again for your attention to this matter,
    Dan

  • Synchronized session performance issue with Linux

    Hi,
    I have some code (in a Struts Action) that streams out a BufferedImage object from a user's session object and then removes it.
    I remove the BufferedImage object from session in a synchronized block.
    When testing on my Windows 2000 laptop performance is fantastic, however, when I scale up to our Linux test servers, it is much slower, 5 secs. compared to 1 sec. before.
    Both platforms running identical JVMs and versions of Tomcat - anyone else experience this?
    Best Regards

    The fact that the block is synchronized should not impact performance unless multiple clients access the same session (and I don't see how that could happen). What object are you synchronizing on?
    How big is the BufferedImage? How are you testing the application? You say you are streaming the image as output -- do you test with a web browser pointing at localhost in both cases? A large BufferedImage being transferred over the ethernet as opposed to the local loopback would certainly cause the extra delay you're seeing. What are the specs of your Win2k laptop and Linux test servers? You really need to do more investigation before you start making claims like "Java is slower on Linux than Windows" (which is effectively what you're suggesting).

Maybe you are looking for