Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogicApp Poor Performance #9

Open
davokr opened this issue Mar 5, 2024 · 0 comments
Open

LogicApp Poor Performance #9

davokr opened this issue Mar 5, 2024 · 0 comments

Comments

@davokr
Copy link

davokr commented Mar 5, 2024

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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant