src/sap.ui.core/src/sap/ui/core/Component.js
function getPreloadModelConfigsFromManifest(oManifest, oComponentData, mCacheTokens) {
		var mModelConfigs = {
			afterManifest: {},
			afterPreload: {}
		};

		// deep clone is needed as the mainfest only returns a read-only copy (freezed object)
		var oManifestDataSources = jQuery.extend(true, {}, oManifest.getEntry("/sap.app/dataSources"));
		var oManifestModels = jQuery.extend(true, {}, oManifest.getEntry("/sap.ui5/models"));

		var mAllModelConfigurations = Component._createManifestModelConfigurations({
			models: oManifestModels,
			dataSources: oManifestDataSources,
			manifest: oManifest,
			componentData: oComponentData,
			cacheTokens: mCacheTokens
		});

		// Read internal URI parameter to enable model preload for testing purposes
		// Specify comma separated list of model names. Use an empty segment for the "default" model
		// Examples:
		//   sap-ui-xx-preload-component-models-<componentName>=, => prelaod default model (empty string key)
		//   sap-ui-xx-preload-component-models-<componentName>=foo, => prelaod "foo" + default model (empty string key)
		//   sap-ui-xx-preload-component-models-<componentName>=foo,bar => prelaod "foo" + "bar" models
		var sPreloadModels = new UriParameters(window.location.href).get("sap-ui-xx-preload-component-models-" + oManifest.getComponentName());
		var aPreloadModels = sPreloadModels && sPreloadModels.split(",");

		for (var sModelName in mAllModelConfigurations) {
			var mModelConfig = mAllModelConfigurations[sModelName];

			// activate "preload" flag in case URI parameter for testing is used (see code above)
			if (!mModelConfig.preload && aPreloadModels && aPreloadModels.indexOf(sModelName) > -1 ) {
				mModelConfig.preload = true;
				Log.warning("FOR TESTING ONLY!!! Activating preload for model \"" + sModelName + "\" (" + mModelConfig.type + ")",
					oManifest.getComponentName(), "sap.ui.core.Component");
			}

			// ResourceModels with async=false should be always loaded beforehand to get rid of sync requests under the hood (regardless of the "preload" flag)
			if (mModelConfig.type === "sap.ui.model.resource.ResourceModel" &&
				Array.isArray(mModelConfig.settings) &&
				mModelConfig.settings.length > 0 &&
				mModelConfig.settings[0].async !== true
			) {
				// Use separate config object for ResourceModels as the resourceBundle might be
				// part of the Component-preload which isn't available when the regular "preloaded"-models are created
				mModelConfigs.afterPreload[sModelName] = mModelConfig;
			} else if (mModelConfig.preload) {
				// Only create models:
				//   - which are flagged for preload (mModelConfig.preload) or activated via internal URI param (see above)
				//   - in case the model class is already loaded (otherwise log a warning)
				if (sap.ui.loader._.getModuleState(mModelConfig.type.replace(/\./g, "/") + ".js")) {
					mModelConfigs.afterManifest[sModelName] = mModelConfig;
				} else {
					Log.warning("Can not preload model \"" + sModelName + "\" as required class has not been loaded: \"" + mModelConfig.type + "\"",
						oManifest.getComponentName(), "sap.ui.core.Component");
				}
			}

		}

		return mModelConfigs;
	}
function getPreloadModelConfigsFromManifest(oManifest, oComponentData, mCacheTokens) {
		var mModelConfigs = {
			afterManifest: {},
			afterPreload: {}
		};

		// deep clone is needed as the mainfest only returns a read-only copy (freezed object)
		var oManifestDataSources = jQuery.extend(true, {}, oManifest.getEntry("/sap.app/dataSources"));
		var oManifestModels = jQuery.extend(true, {}, oManifest.getEntry("/sap.ui5/models"));

		var mAllModelConfigurations = Component._createManifestModelConfigurations({
			models: oManifestModels,
			dataSources: oManifestDataSources,
			manifest: oManifest,
			componentData: oComponentData,
			cacheTokens: mCacheTokens
		});

		// Read internal URI parameter to enable model preload for testing purposes
		// Specify comma separated list of model names. Use an empty segment for the "default" model
		// Examples:
		//   sap-ui-xx-preload-component-models-<componentName>=, => prelaod default model (empty string key)
		//   sap-ui-xx-preload-component-models-<componentName>=foo, => prelaod "foo" + default model (empty string key)
		//   sap-ui-xx-preload-component-models-<componentName>=foo,bar => prelaod "foo" + "bar" models
		var sPreloadModels = new UriParameters(window.location.href).get("sap-ui-xx-preload-component-models-" + oManifest.getComponentName());
		var aPreloadModels = sPreloadModels && sPreloadModels.split(",");

		for (var sModelName in mAllModelConfigurations) {
			var mModelConfig = mAllModelConfigurations[sModelName];

			// activate "preload" flag in case URI parameter for testing is used (see code above)
			if (!mModelConfig.preload && aPreloadModels && aPreloadModels.indexOf(sModelName) > -1 ) {
				mModelConfig.preload = true;
				Log.warning("FOR TESTING ONLY!!! Activating preload for model \"" + sModelName + "\" (" + mModelConfig.type + ")",
					oManifest.getComponentName(), "sap.ui.core.Component");
			}

			// ResourceModels with async=false should be always loaded beforehand to get rid of sync requests under the hood (regardless of the "preload" flag)
			if (mModelConfig.type === "sap.ui.model.resource.ResourceModel" &&
				Array.isArray(mModelConfig.settings) &&
				mModelConfig.settings.length > 0 &&
				mModelConfig.settings[0].async !== true
			) {
				// Use separate config object for ResourceModels as the resourceBundle might be
				// part of the Component-preload which isn't available when the regular "preloaded"-models are created
				mModelConfigs.afterPreload[sModelName] = mModelConfig;
			} else if (mModelConfig.preload) {
				// Only create models:
				//   - which are flagged for preload (mModelConfig.preload) or activated via internal URI param (see above)
				//   - in case the model class is already loaded (otherwise log a warning)
				if (sap.ui.loader._.getModuleState(mModelConfig.type.replace(/\./g, "/") + ".js")) {
					mModelConfigs.afterManifest[sModelName] = mModelConfig;
				} else {
					Log.warning("Can not preload model \"" + sModelName + "\" as required class has not been loaded: \"" + mModelConfig.type + "\"",
						oManifest.getComponentName(), "sap.ui.core.Component");
				}
			}

		}

		return mModelConfigs;
	}
function getPreloadModelConfigsFromManifest ( oManifest , oComponentData , mCacheTokens ) { var mModelConfigs = { afterManifest : { } , afterPreload : { } } ; // deep clone is needed as the mainfest only returns a read-only copy (freezed object) var oManifestDataSources = jQuery . extend ( true , { } , oManifest . getEntry ( "/sap.app/dataSources" ) ) ; var oManifestModels = jQuery . extend ( true , { } , oManifest . getEntry ( "/sap.ui5/models" ) ) ; var mAllModelConfigurations = Component . _createManifestModelConfigurations ( { models : oManifestModels , dataSources : oManifestDataSources , manifest : oManifest , componentData : oComponentData , cacheTokens : mCacheTokens } ) ; // Read internal URI parameter to enable model preload for testing purposes // Specify comma separated list of model names. Use an empty segment for the "default" model // Examples: //   sap-ui-xx-preload-component-models-<componentName>=, => prelaod default model (empty string key) //   sap-ui-xx-preload-component-models-<componentName>=foo, => prelaod "foo" + default model (empty string key) //   sap-ui-xx-preload-component-models-<componentName>=foo,bar => prelaod "foo" + "bar" models var sPreloadModels = new UriParameters ( window . location . href ) . get ( "sap-ui-xx-preload-component-models-" + oManifest . getComponentName ( ) ) ; var aPreloadModels = sPreloadModels && sPreloadModels . split ( "," ) ; for ( var sModelName in mAllModelConfigurations ) { var mModelConfig = mAllModelConfigurations [ sModelName ] ; // activate "preload" flag in case URI parameter for testing is used (see code above) if ( ! mModelConfig . preload && aPreloadModels && aPreloadModels . indexOf ( sModelName ) > - 1 ) { mModelConfig . preload = true ; Log . warning ( "FOR TESTING ONLY!!! Activating preload for model \"" + sModelName + "\" (" + mModelConfig . type + ")" , oManifest . getComponentName ( ) , "sap.ui.core.Component" ) ; } // ResourceModels with async=false should be always loaded beforehand to get rid of sync requests under the hood (regardless of the "preload" flag) if ( mModelConfig . type === "sap.ui.model.resource.ResourceModel" && Array . isArray ( mModelConfig . settings ) && mModelConfig . settings . length > 0 && mModelConfig . settings [ 0 ] . async !== true ) { // Use separate config object for ResourceModels as the resourceBundle might be // part of the Component-preload which isn't available when the regular "preloaded"-models are created mModelConfigs . afterPreload [ sModelName ] = mModelConfig ; } else if ( mModelConfig . preload ) { // Only create models: //   - which are flagged for preload (mModelConfig.preload) or activated via internal URI param (see above) //   - in case the model class is already loaded (otherwise log a warning) if ( sap . ui . loader . _ . getModuleState ( mModelConfig . type . replace ( / \. / g , "/" ) + ".js" ) ) { mModelConfigs . afterManifest [ sModelName ] = mModelConfig ; } else { Log . warning ( "Can not preload model \"" + sModelName + "\" as required class has not been loaded: \"" + mModelConfig . type + "\"" , oManifest . getComponentName ( ) , "sap.ui.core.Component" ) ; } } } return mModelConfigs ; }
Returns two maps of model configurations to be used for the model "preload" feature.
Used within loadComponent to create models during component load.

"afterManifest"
Models that are activated for preload via "preload=true" or URI parameter.
They will be created after the manifest is available.

"afterPreload"
Currently only for ResourceModels with async=false (default) to prevent sync requests
by loading the corresponding ResourceBundle in advance.
They will be created after the Component-preload has been loaded, as most apps package
their ResourceBundles within the Component-preload.

@param {sap.ui.core.Manifest} oManifest Manifest instance
@param {object} [oComponentData] optional component data object
@param {object} [mCacheTokens] optional cache tokens for OData models
@returns {object} object with two maps, see above
Returns two maps of model configurations to be used for the model preload feature . Used within loadComponent to create models during component load .