I’‘ve noticed that Spark 2.0.7 on OSX is running as an (emulated) PPC application. This is due to the fact that the “JavaApplicationStub” executable is not an universal binary. Replacing this with a current JavaApplicationStub from the latest Apple developer tools fixes it. Spark starts a lot faster and feels quite “zippier”. I’'m not aware of all the details, but AFAIK if you start an application in Rosetta, it stays there all the time.
Maybe someone could fix it in the Spark release. What do you think?
I’'m not seeing this on my machine; Core 2 Duo Macbook running 10.4.8 and a copy of Spark downloaded this morning. Activity Monitor shows Spark as Intel-native.
Strange, although you’'re certainly right.
My console output:
mbp:~ christian$ otool -hv /Volumes/spark_2_0_7/Spark.app/Contents/MacOS/JavaApplicationStub
magic cputype cpusubtype filetype ncmds sizeofcmds flags
MH_MAGIC PPC ALL EXECUTE 13 2920 NOUNDEFS DYLDLINK TWOLEVEL
As you can see for yourself, the current release contains a PPC-only Java stub. On the other hand, activity monitor shows the running instance as being Intel-native. I don’'t quite understand that… however, updating the stub application still seems like a good idea to me. Regards,
I believe the reason why Spark is being shown as an Intel application in the Activity Monitor is because the JVM is a Universal Binary* so all Java applications are going to report their “Kind” as Intel. In any event, replacing the PPC JavaApplicationStub with the Universal Binary version doesn’'t seem to have any ill effects on my Intel and PPC (G4 and G5 Xserves) Macs so it seems like it would be a worthwhile change.
- To verify this you can run the following command from the cmd line:
lipo -info /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java
which should produce something like the following:
Architectures in the fat file: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java are: i386 ppc
Doing a clean build of Spark trunk on my machine results in it having a universal JavaApplicationStub, so I expect this will be fixed without having to change anything. I’'ll make sure to check before release.