Skip to content

LogicApp Poor Performance #9

@davokr

Description

@davokr

The Logic App is obscenely slow to run due to the way it chunks the requests.

You can significantly improve performance by composing the SCIM user component and appending it to a single array that contains all SCIM users. This ForEach should run in parallel.

Then, chunk(variable('allusers'),50) so you have an array of arrays which contain no more than 50 users each. Then, ForEach chunk, compose the starting part of the SCIM request, 50 user array, and ending part of the SCIM request.

@{variables('SCIMBulkPayload')}@{items('For_each')}@{variables('SCIMBulkPayloadEnd')}

The second ForEach should run sequentiall, and contain the POST action.

"Initialize_SCIMBulkPayload": {
    "inputs": {
        "variables": [
            {
                "name": "SCIMBulkPayload",
                "type": "string",
                "value": "{\n  \"schemas\": [\n    \"urn:ietf:params:scim:api:messages:2.0:BulkRequest\"\n  ],\n  \"Operations\": \n"
            }
        ]
    },
    "runAfter": {},
    "type": "InitializeVariable"
},
"Initialize_SCIMBulkPayloadEnd": {
    "inputs": {
        "variables": [
            {
                "name": "SCIMBulkPayloadEnd",
                "type": "string",
                "value": "  ,\n  \"failOnErrors\": null\n}"
            }
        ]
    },
    "runAfter": {},
    "type": "InitializeVariable"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions