cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Impactful Individual
Impactful Individual

Do nested Concurrent work in parallel?

Hello,

Please be so kind as to read my full post before responding.

Thank you for your consideration.

I am currently facing the problem that my complex PowerApp (easily 500+ controls, and long App.OnStart) loads too slowly.
I am considering restructuring my App.OnStart with (nested) Concurrent.

I don't find anything on using this funtion in a nested way in the documentation
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-concurrent

In particular, I want to now if my nested Concurrent in something like this

Concurrent(
    General_Stuff(),

    …,

    If(Connection.Connected, Concurrent(
        Stuff_which_requires_network_access(),
        ...
    ), Concurrent(
        Stuff_to_do_when_offline_instead(),
        …
    )
)

will also work in parallel.

  1. Will this work as I want?
    That is: the things inside the If(Connection.Connected, Concurrent( things )) also run in parallel.
  2. Or is there some rule/implementation in place that, say, only makes the top/bottom level Concurrent parallel?


If you answer me, can also please accompany this with documentation or timing, or the word of an actual developer?

Thank you,
    Sa Wu.

3 REPLIES 3
Community Support
Community Support

Hi @SaWu ,

Could you please share a bit more about your scenario?

Do you want to execute a nested Concurrent formula within your app?

 

If you want to execute a nested Concurrent formula within your app, I think PowerApps could achieve your needs. I have made a test on my side, the screenshot as below:5.JPG

 

For your first question, based on the fomrula you provided, I think it would work within your app.

 

For your second question, for each Concurrent function, each argument formula within the Concurrent function would be executed at the same time.

For your formula, the General_Stuff(), ..., and If(Connection.Connected, ...) fomula would be executed at the same time. When executing the If(...) formula, the each argument formula within the nested Concurrent function would also be executed at the same time.

 

In addition, you can quickly measure your formula’s performance by turning on Developer Tools in Microsoft Edge or Google Chrome while running the app. The screenshot as below:6.JPG

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @SaWu how are you progressing with this? Was the above reply helpful?

 

@Anonymous 

Impactful Individual
Impactful Individual

Hello,

Thanks for the replies, the above answer has been helpful, but I don't know yet if it's a complete solution to my question.
I was aware that nested Concurrent worked in the sense that the code inside would run properly.
What I wasn't and am not sure about, is whether code inside nested Concurrent would really run in parallel and give a performance benefit compared to sequential statements.
I still haven't finished testing and checking the latter question with the tools of above reply yet.
I would like some graphs, screenshots, data, developer pointing out implementation, ... 

Thanks,
    Sa.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (25,214)