Re: IJ under linux performance problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: IJ under linux performance problem

Jonathan Jackson-2
Hi,

I recently started using java 1.6 with ImageJ on linux and am having some
issues that were discussed on the list about a year ago - has anyone found a
work-around?  

It seems that when I run a menu command, like Multiply, all open images that
are on the task bar (Gnome, not ImageJ) are 'closed' one by one, until there
is just a single ImageJ window listed on the task bar.  Then the Dialog box
pops up.  Once the command is completed, all images are listed again on the
task bar. When ImageJ is running on the local machine, there's a fraction of
a second delay per open image, but when it's running on a remote server, the
delay is a whole second per image; just a little bit impractical!

On the other hand, some things, like Sync Windows, work much faster under
Java 1.6

Thanks in advance,
Jon

On Wed, 29 Aug 2007 13:05:27 +0100, Gabriel Landini <[hidden email]>
wrote:

>Hi,
>I think I may have mentioned if before. Running ImageJ 1.39d under opensuse
>with Java 1.6.0_02-ea I have the following performance problem:
>
>I open the mri-stack sample and convert it from stack to images (i.e. 27
>images open).
>If I do some operation on one of the images (like a Multiply by 2, or a
>Maximum filter) then IJ starts to behave very slow.
>For the Math dialog "Multiply" to appear it takes 6 seconds or so. Anything
>that shows a dialog, takes approximately this time to open.
>
>Then when I try to close the processed window, the "Save changes?" window
>takes another 5 sec to appear. However, closing the other images -which have
>not been processed  and do not show a dialog- close quite quickly.
>
>The macro below works fine and reports 256 ms to close the processed image in
>my machine (P4, 2GHz).
>
>run("MRI Stack (528K)");
>run("Convert Stack to Images");
>selectWindow("mri-stack-0001");
>run("Multiply...", "value=2");
>t=getTime();
>close();
>print("time: "+getTime()-t);
>
>However doing it by hand (the first 4 lines) introduces the delays mentioned
>abovE, and it seems that the more images, the longer the delay (with 54
>images this is about 12 sec delay!). It happens every time I try.
>
>Has anybody seen this behaviour?
>Where should one start to solve this problem?
>
>Java 1.5.0 does not seem to be affected, but there are some advantages in
>using 1.6.0: less memory use when loading 8 bit and RGB images (so it would
>be a shame not to take advantage of it).
>
>Thanks in advance.
>
>Gabriel
>=========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: IJ under linux performance problem

Michael Doube
Jon

I have no particular workaround for this, except to disable desktop
effects (compiz) if you have them running.
I feel your pain though; it takes time to collapse all the taskbar icons
and then expand them out again, which is noticable (and distracting)
when you're working on a bunch of images.

Java / Gnome issues are being addressed to some extent by Sun, though a
bit slowly (I filed this report some months ago...
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6752009 )

You could try a development version of JDK7 and see if the bug is still
there:
https://jdk7.dev.java.net/

Mike

Jonathan Jackson wrote:

> Hi,
>
> I recently started using java 1.6 with ImageJ on linux and am having some
> issues that were discussed on the list about a year ago - has anyone found a
> work-around?  
>
> It seems that when I run a menu command, like Multiply, all open images that
> are on the task bar (Gnome, not ImageJ) are 'closed' one by one, until there
> is just a single ImageJ window listed on the task bar.  Then the Dialog box
> pops up.  Once the command is completed, all images are listed again on the
> task bar. When ImageJ is running on the local machine, there's a fraction of
> a second delay per open image, but when it's running on a remote server, the
> delay is a whole second per image; just a little bit impractical!
>
> On the other hand, some things, like Sync Windows, work much faster under
> Java 1.6
>
> Thanks in advance,
> Jon
>
> On Wed, 29 Aug 2007 13:05:27 +0100, Gabriel Landini <[hidden email]>
> wrote:
>
>  
>> Hi,
>> I think I may have mentioned if before. Running ImageJ 1.39d under opensuse
>> with Java 1.6.0_02-ea I have the following performance problem:
>>
>> I open the mri-stack sample and convert it from stack to images (i.e. 27
>> images open).
>> If I do some operation on one of the images (like a Multiply by 2, or a
>> Maximum filter) then IJ starts to behave very slow.
>> For the Math dialog "Multiply" to appear it takes 6 seconds or so. Anything
>> that shows a dialog, takes approximately this time to open.
>>
>> Then when I try to close the processed window, the "Save changes?" window
>> takes another 5 sec to appear. However, closing the other images -which have
>> not been processed  and do not show a dialog- close quite quickly.
>>
>> The macro below works fine and reports 256 ms to close the processed image in
>> my machine (P4, 2GHz).
>>
>> run("MRI Stack (528K)");
>> run("Convert Stack to Images");
>> selectWindow("mri-stack-0001");
>> run("Multiply...", "value=2");
>> t=getTime();
>> close();
>> print("time: "+getTime()-t);
>>
>> However doing it by hand (the first 4 lines) introduces the delays mentioned
>> abovE, and it seems that the more images, the longer the delay (with 54
>> images this is about 12 sec delay!). It happens every time I try.
>>
>> Has anybody seen this behaviour?
>> Where should one start to solve this problem?
>>
>> Java 1.5.0 does not seem to be affected, but there are some advantages in
>> using 1.6.0: less memory use when loading 8 bit and RGB images (so it would
>> be a shame not to take advantage of it).
>>
>> Thanks in advance.
>>
>> Gabriel
>> =========================================================================
>>    
Reply | Threaded
Open this post in threaded view
|

Re: IJ under linux performance problem

Jonathan Jackson-2
In reply to this post by Jonathan Jackson-2
Mike,

Thanks for the suggestions.

>I have no particular workaround for this, except to disable desktop
>effects (compiz) if you have them running.

>I feel your pain though; it takes time to collapse all the taskbar icons
>and then expand them out again, which is noticable (and distracting)
>when you're working on a bunch of images.
>
>Java / Gnome issues are being addressed to some extent by Sun, though a
>bit slowly (I filed this report some months ago...
>http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6752009 )

I've added a 'vote' to this bug as I think it's important that java / compiz
eventually work together properly.

>You could try a development version of JDK7 and see if the bug is still
>there:
>https://jdk7.dev.java.net/

I downloaded jdk-7-ea-bin-b36-linux-x64-25_sep_2008.bin and tried running
ImageJ with that, but it crashes out horribly...

I'll go back to 1.5 for the time being.

cheers,
Jon

>
>Jonathan Jackson wrote:
>> Hi,
>>
>> I recently started using java 1.6 with ImageJ on linux and am having some
>> issues that were discussed on the list about a year ago - has anyone found a
>> work-around?
>>
>> It seems that when I run a menu command, like Multiply, all open images that
>> are on the task bar (Gnome, not ImageJ) are 'closed' one by one, until there
>> is just a single ImageJ window listed on the task bar.  Then the Dialog box
>> pops up.  Once the command is completed, all images are listed again on the
>> task bar. When ImageJ is running on the local machine, there's a fraction of
>> a second delay per open image, but when it's running on a remote server, the
>> delay is a whole second per image; just a little bit impractical!
>>
>> On the other hand, some things, like Sync Windows, work much faster under
>> Java 1.6
>>
>> Thanks in advance,
>> Jon
>>