[jira] [Commented] (SYNCOPE-1199) Syncope performance: AnyObjectTO's creation time grows with it's quantity

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SYNCOPE-1199) Syncope performance: AnyObjectTO's creation time grows with it's quantity

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SYNCOPE-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152741#comment-16152741 ]

Colm O hEigeartaigh commented on SYNCOPE-1199:
----------------------------------------------

I'll answer my own question here. This issue was fixed as part of:

https://github.com/apache/syncope/commit/120d1e2829abcccf622d9ba5f7028107cb6c8807

The previous code was getting all assignable any objects, even if no relationships were being defined for the newly created object. With a large number of AnyObjects I guess this exacts a performance penalty.

The question that springs to mind is whether there is not some way we can avoid this step even if a relationship is defined? After we find the "other end" via:

AnyObject otherEnd = anyObjectDAO.find(relationshipTO.getRightKey());

is there not some way we can check that we can assign the newly created object to "otherEnd" without searching through all the assignable objects?

I will mark this issue as "resolved" for 2.0.5, as this fix takes care of the issue (when no relationships are specified).



> Syncope performance: AnyObjectTO's creation time grows with it's quantity
> -------------------------------------------------------------------------
>
>                 Key: SYNCOPE-1199
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1199
>             Project: Syncope
>          Issue Type: Bug
>    Affects Versions: 2.0.2, 2.0.4
>         Environment: Syncope 2.0.2 and 2.0.4 + PostgreSQL 9; Jmeter;
> https://github.com/Talend/platform-services/tree/master/iam/idp
>            Reporter: Iurii Smyrnov
>            Assignee: Matteo Alessandroni
>         Attachments: CreateTestSyncope_genericResults_AnyObject.csv, CreateTestSyncope_graph_AnyObject.csv, CreateTestSyncope.jmx, CreateTestSyncope_onlyCreationAggregateReport_AnyObject.csv, Latency for 1000 create roles (directly syncope 2.0.4) no SCIM.csv, Latency for 1000 create roles (directly syncope 2.0.4).png, Latency for 1037 create roles (directly syncope 2.0.2) no SCIM.csv, Latency for 1037 create roles (directly syncope 2.0.2).png, Latency for 3000 create roles (directly syncope 2.0.2).csv, Latency for 3000 create roles (directly syncope 2.0.2).png, Latency for 3000 create roles (directly syncope 2.0.4).png, MasterContent.xml
>
>
> *AnyObjetcTO's creation time (latency) grows with it's quantity.*
> Testing results are attached (Latency in milliseconds).
> Note: We've tested PostgreSQL DB directly (without Syncope) and we've got stable AnyObjetcTO's creation time (not increasing).
> User Syncope 2.0.4 or 2.0.4 and  + PostgreSQL 9
> URI: http://localhost:9080/syncope/rest/anyObjects 
> http headers:
>  1.Content-Type / application/json
>   2 Accept / application/json
> verb: POST
> body:
>     {
>      "plainAttrs":[
>       {
>        "values":[
>          "test-value"
>        ],
>        "schema":"roleEntitlements"
>       }
>      ],
>     "type":"RoleAT",
>     "realm":"/",
>     "@class":"org.apache.syncope.common.lib.to.AnyObjectTO",
>     "auxClasses":["RoleATClass"],
>     "name":"Role_Account_1"
>   }
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)