This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Performance test reports that the following classes loaded during startup: > org.netbeans.api.javafx.platform.JavaFXPlatform > org.netbeans.modules.javafx.platform.platformdefinition.DefaultPlatformImpl > org.netbeans.modules.javafx.platform.platformdefinition.JavaFXPlatformImpl > org.netbeans.modules.javafx.platform.platformdefinition.PlatformConvertor > org.netbeans.modules.javafx.platform.platformdefinition.PlatformConvertor$H > org.netbeans.modules.javafx.platform.platformdefinition.Util Comment from jtulach: "P3 for java.j2seplatform module to not load JavaFXPlatform when searching only for J2SE platform. We will need Tomáš Zezula help to analyse what can be done. My raw guess is that replacing JavaPlatformProvider with @Registration could help. Probably nothing to be done for 6.8." Build 20090922 test: ant in ide.kit/tests/whitelist
Created attachment 88283 [details] stacktraces
I will take ac look at it.
I've fixed the JPM.getDefaultPlatform not to load the non needed platforms. jet-main #ff6cdaaaed48 But the J2SEPlatform ModuleInstall needs to update platforms properties in the build.properties. It needs to list all j2se platforms (but it's impossible to distinguish them from jfx platforms). It will require incompatible SPI change. From my point of view it's a WONTFIX as the jfx platforms are created immediately by the similar code in javafx module. But as far as I know Jarda is working on code allowing initialization in time when project is opened, this would be enough for J2SEPlatform ModuleInstall. Reassigning to Jarda
BTW can anyone explain what does the PERFORMANCE, REGRESSION, TEST in context of this issue mean?
* PERFORMANCE - we watch the number of classes loaded during startup for performance reasons. * REGRESSION - means that these classes were not loaded during startup before, they appeared there recently. We try to keep the number of loaded classes during startup not growing too much. * TEST - the new classes were revealed by a test. You can read more about it on the page linked in the URL field.
PERFORMANCE - the classes are loaded by JXPlatform ModuleInstall REGRESSION - the code is unchanged from 4.0
Tomáš and me identified that the latest possible moment for generating the user.build.properties file (and thus instantiating the platforms) is at the time Ant build is started. Tomáš will experiment with registering AntLogger and generating the file when the first build is about to start. The JavaFXPlatform will probably still be loaded on start for other reasons - the issue shall be reassigned closer to such reason then.
I've rewritten the J2SEPlatformModule not to update the build.properties. The build.properties is updated when the Ant is started for the first time (using Ant logger). Seems to work fine, I will test it for a while and integrate.
Fixed in jet-main b994f731adf2
Integrated into 'main-golden', will be available in build *200910140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ff6cdaaaed48 User: Tomas Zezula <tzezula@netbeans.org> Log: #173008:Don't load JavaFXPlatform when searching only for J2SE platform
Looks good. BTW why does J2SEPlatformModule even still exist now? Seems to me that recoverDefaultPlatform could also be run some other time, on demand if and when the list of platforms is requested.
OK, I will postpone the recoverDefaultPlatform.
I've filled enhancement 175111 to remove the J2SEPlatformModule class. The restoreDefaultPlatform needs to be moved into the Java Platform module (JavaPlatformProvider).