David Griffon created UNOMI-759:
-----------------------------------

             Summary: Perfomance issue on export profile
                 Key: UNOMI-759
                 URL: https://issues.apache.org/jira/browse/UNOMI-759
             Project: Apache Unomi
          Issue Type: Bug
            Reporter: David Griffon


Currently the profile export do a query for each profile exported to get the 
property types:

https://github.com/apache/unomi/blob/9fbdf43abcdcb3aa5ebae4612f96d698d3e0a28f/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileExportServiceImpl.java#L62
{code}
public String convertProfileToCSVLine(Profile profile, ExportConfiguration 
exportConfiguration) {
        Collection<PropertyType> propertiesDef = 
persistenceService.query("target", "profiles", null, PropertyType.class);
        Map<String, String> mapping = (Map<String, String>) 
exportConfiguration.getProperty("mapping");
        String lineToWrite = "";
   ...
{code}

This is used to check if the property is multivalued or not. 
2 ways of improvement are possible:

1 / Store the information in the export configuration, it currently contains a 
mapping (the list of properties to export), we could add details of it at the 
same level. To keep the compatibility with previous configuration, we can 
fallback on checking on the property type if the information is missing. 
1 / Use a cache for property types (as we do for rules or other unomi Items) 




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to