3 ms·
Maybe someone here knows with something I've been struggling with lately. In modern systems when running a java created binary, I find it runs much slower on a
by jzer0cool 6y ago
Maybe someone here knows with something I've been struggling with lately. In modern systems when running a java created binary, I find it runs much slower on a mac, then on a PC especially. Not sure, but I find the ui jitters and stalls (imagine running heavy app in a vm container) when there is a lot of data pulling from a remote site.
Is there a way to drive performance to the JVM, or shed light to what might be the cause? Thoughts to why a much older pc with less memory, worst memory card, seems to perform flawlessly.
Here to look for any other solutions I could try. I love to be working on the mac, but like to have the performance I find when running the java app (with ui elements) on a pc. Something that comes to mind at the moment is maybe trying here a remote desktop to a windows machine to see if performance is better than running natively on the mac.
Sorry in advanced for the slight vagueness on the specific app running and lack of specs provided.
- pirocks 6y agoMy first suggestion would to see if the lag corresponds to a full GC. Google can tell you the proper incantation to log GC events. If it is caused by a full GC you probably have some kind pathological behavior causing it . Allocating more RAM or changing GC args may help. Otherwise I would recommend profiling. You can use visualvm which should come with your jdk for that.
- jzer0cool 6y agoIf given a mac binary (and only that, only see it as a mac app and unsure here if there is a wrapper around it to make it so), is there a typical way to run it like pure java binary so I can add any xarg params for running it? I'll probably need to due a quick check on how a wrapper might have been created as it looks like a mac app so I can separate out the pure java binary. Memory: As far as I see, there is a built-in profiler within the app showing the memory usage. It has a high limit to 1gb and I see it rise quickly to about third of the way and repeated (quickly, about every 2 seconds) garbage collect down to 200mb. So it appears memory consumed very fast and than it garbage collects. Then repeats.
- Someone 6y agoChances are that your Mac binary is a MacOS package (https://en.m.wikipedia.org/wiki/Package_(macOS) https://en.m.wikipedia.org/wiki/Package_(macOS): “In the Apple macOS operating system, a package is a file system directory that is normally displayed to the user by the Finder as if it were a single file”) Right-click the binary and select “Show package contents” to peek inside. Chances are you’ll find a code signature, an icon, various support files, one or more jars and an executable that launches the main jar. Figuring out what the main jar is typically is easy. You may have to experiment to find out what the current directory has to be when launching it.
- jzer0cool 6y agoAppreciate pointing me in the right direction! Show package contents is exactly what I was looking for. I was looking in the wrong spot before with App Info (cntr + i). Thought I share where I am at: I think I'm in the right direction now. There are log files associated with previous crashes due to out of mem errors. The app here also includes a java vm_param file so I can maybe experiment with a few settings here and hoping here by decreasing the GC recycling time maybe things improve. Also, I will be looking whether the app may have somehow embedded a jvm (possible?) rather than using the one I have provided.