/** * Reads the parameters files and system settings to retreive the actual performance parameters. * It updates the "actualParameters" according to the configuration loaded. * * @return the actual performance parameters, loaded by this method */ static synchronized PerformanceParameters loadConfiguration() { Config configuration = Config.instance().load(); Preferences preferences = configuration.preferences(); PerformanceParameters actualParameters = new PerformanceParameters(); VMParameters netBeansVmParameters = VMParameters.load(); actualParameters.setVMParameters(netBeansVmParameters.toString()); actualParameters.setCachePath(SystemUtils.getCacheDir().toPath()); final int defaultNbThreads = JavaSystemInfos.getInstance().getNbCPUs(); actualParameters.setNbThreads(preferences.getInt(PROPERTY_JAI_PARALLELISM, defaultNbThreads)); actualParameters.setDefaultTileSize(preferences.getInt(PROPERTY_DEFAULT_TILE_SIZE, 0)); actualParameters.setCacheSize(preferences.getInt(PROPERTY_JAI_CACHE_SIZE, 0)); return actualParameters; }
/** * Build a string from vm parameters * * @return VM parameters as a String */ public String getVMParameters() { return vmParameters.toString(); }