Login  Register

Re: java 8 and OSX

Posted by ctrueden on Jul 10, 2016; 10:19pm
URL: http://imagej.273.s1.nabble.com/java-8-and-OSX-tp5016839p5016845.html

Hi Brandon & Aryeh,

I am fairly confident that the cause is attaching AWT menus bars, as I
outline here:
  http://forum.imagej.net/t/mac-java-speed-issues/304/4?u=ctrueden

Someone with a technical background needs to investigate the potential
solutions to the issue that I mention in that post.

In particular, using the Apple-specific "Application.setDefaultMenuBar"
method is highly likely to fix the issue. However, as I outline here:
  http://forum.imagej.net/t/mac-java-speed-issues/304/8?u=ctrueden

It would be a bit of work to add code to ImageJ2 to hot-translate the
ImageJ 1.x AWT menu bar to a Swing JMenuBar. The good news is that doing
this would have multiple advantages:

* The "grinding to a halt" performance problem would likely disappear.
* We would have a richer menu bar with icons for ImageJ2 commands that
provide them. ;-)
* The menu bar flashing when you switch windows would no longer happen.

The downside is that it is more complex internally, since we would need to
keep the JMenuBar internally synchronized with the menu bar that IJ1
believes is its menu bar (but in actuality is now never actually attached
to any windows).

There might also be unforeseen technical obstacles with my proposed
solution here. All in all, it would probably cost me several days to
explore and implement this fix, and I currently have other more urgent
priorities. But I will try to make time to do this work early this fall.

Regards,
Curtis


--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Sun, Jul 10, 2016 at 5:15 PM, Brandon Hurr <[hidden email]>
wrote:

> We've been going back and forth on it a bit on the forums too:
> http://forum.imagej.net/t/mac-java-speed-issues/304
>
> I think we really need to help pin this down for Chris and Wayne so they
> can make a change. I've simply not had the time recently to dig further,
> but I intend to when the field season here settles down.
>
> It is absolutely related to the changing of windows, but what exactly is
> causing it is unclear to me. It does not happen when in batch mode. Only
> when in interactive mode.
>
> On Sun, Jul 10, 2016 at 4:23 AM, Aryeh Weiss <[hidden email]> wrote:
>
> > About a year ago I wrote about Fiji slowing down during use with Java 8
> > and OSX.
> > http://imagej.1557.x6.nabble.com/java-8-and-OSX-td5013642.html
> >
> > As this is still happening, I want to find out if there is any additional
> > information about this.
> >
> > I am now using OSX 10.11.5 with Java 1.8.0_92 (64-bit).
> > I have 16GB RAM.
> >
> > Wayne had noted that menu updates are problematic, and added a parameter
> > SetMenuBarCount: to follow that.
> > I note problems when this is over 50, but I cannot say when it really
> > becomes unusable and I have to quit and start again.
> >
> > One thing that I noticed -- if I allocate 12GB to Fiji, then the problems
> > will start much sooner than if I allocate 10GB to Fiji.
> > So I suspect that some resource that Fiji uses, which is outside of Fiji,
> > is using up memory (but I dont know how to check this).
> >
> > Do people who are running on high-powered Linux machines have this
> problem?
> >
> > --aryeh
> >
> > --
> > Aryeh Weiss
> > Faculty of Engineering
> > Bar Ilan University
> > Ramat Gan 52900 Israel
> >
> > Ph:  972-3-5317638
> > FAX: 972-3-7384051
> >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html