Improve model load speed by setting XMLResource.OPTION_DISABLE_NOTIFY to true
@@ -91,10 +91,13 @@ public class ArchimateResourceFactory extends ResourceFactoryImpl {
resource.getDefaultSaveOptions().put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
resource.getDefaultLoadOptions().put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
+ // This speeds up loading by a ton!
+ resource.getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+
+ // This also speeds up loading by a ton!
resource.getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.TRUE);
resource.setIntrinsicIDToEObjectMap(new HashMap<String, EObject>());
-
Map<String, Object> parserFeatures = new HashMap<String, Object>();
// Don't allow DTD loading in case of XSS exploits
parserFeatures.put("http://apache.org/xml/features/disallow-doctype-decl", Boolean.TRUE); //$NON-NLS-1$
