Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29274

Improve speed of SchemaManagerImpl.isSecured

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: HOTFIX_10.10, 11.x
    • Component/s: Schema
    • Story Points:
      3

      Description

      SchemaManagerImpl.isSecured, which is used a lot, appears as quite slow in flame graphs and spot-check jstacks:

      10.10 stack trace
      	at java.util.regex.Pattern.atom(Pattern.java:2212)
      	at java.util.regex.Pattern.sequence(Pattern.java:2093)
      	at java.util.regex.Pattern.expr(Pattern.java:2010)
      	at java.util.regex.Pattern.compile(Pattern.java:1702)
      	at java.util.regex.Pattern.<init>(Pattern.java:1352)
      	at java.util.regex.Pattern.compile(Pattern.java:1028)
      	at java.lang.String.replaceAll(String.java:2223)
      	at org.nuxeo.ecm.core.schema.SchemaManagerImpl.cleanPath(SchemaManagerImpl.java:1010)
      	at org.nuxeo.ecm.core.schema.SchemaManagerImpl.isSecured(SchemaManagerImpl.java:994)
      	at org.nuxeo.ecm.core.api.model.impl.PropertyFactory.createProperty(PropertyFactory.java:74)
      	at org.nuxeo.ecm.core.api.model.impl.DocumentPartImpl.createProperty(DocumentPartImpl.java:123)
      	at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.getChild(ComplexProperty.java:117)
      	at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.getChildren(ComplexProperty.java:141)
      	at org.nuxeo.ecm.core.api.model.impl.AbstractProperty.iterator(AbstractProperty.java:130)
      	at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:727)
      	at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:739)
      	at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:713)
      	at org.nuxeo.ecm.core.storage.dbs.DBSDocument.readDocumentPart(DBSDocument.java:1032)
      	at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:198)
      	at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:2026)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: