Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
Suggested answer

New Analysis Engine

(5) ShareShare
ReportReport
Posted on by

Similar to the dependencies between cells in a spreadsheet that drives recalc, Canvas apps depend on understanding all the dependencies between properties of controls so that data can flow between them properly and efficiently.  We call this process "dependency analysis" and it is something that Studio is doing all the time in the background while you are editing an app.

 

For more than a year, we have been rewriting the analysis engine to both perform better and to optimize the results.  The result is that complex Canvas apps that can take minutes to load should load significantly faster.  It is a major change, at the very heart of Canvas apps, that we have been working on for over a year.

 

We are very excited to announce that this feature is now available as an experimental feature for your testing and feedback.  Please make a copy of complex apps, turn on this setting, see if you run into any problems in Studio and at runtime, and provide feedback here in the forum.   

 

Do not use this feature in production!  There could be subtle behavior differences that will take time to discover, just because the app loads and saves doesn't necessarily mean all is well, some testing is needed too.

 

Thank you!  And with your help we hope to turn this feature on for everyone soon.

 

GregLi_1-1701804999605.png

Categories:
  • BaptisteW Profile Picture
    BaptisteW 95 on at
    New Analysis Engine
    Talking about Gallery.Selected, now it looks like we cannot use it as a record.

    For instance: Remove(List; gallery1.Selected) with gallery1.Items being List won't work anymore
  • New Analysis Engine
     
    1) At least one of the apps shared with me did have a case where we're incorrectly marking something as a cycle, so we've fixed that, and that fix will be out in version 3.25014. As to the general case, it's not really a matter of more or less strict, but rather a different approach to marking cycles that is more accurate and faster. Part of that involved formalizing treating references to controls inside galleries from outside slightly differently so that we could avoid some old bugs with Gallery.Selected and Gallery.AllItems, and that lead to a few cases where controls that weren't marked as a cycle under the old engine are now correctly marked as a cycle.
     
    2) Yes, my mistake. Worked on and published. If you're not editing, saving and publishing an app, it will not be touched. 
     
    3) The new analysis engine has been GA since July 2024: New Analysis Engine Now Generally Available!  - Microsoft Power Platform Blog
  • IAmIntractable Profile Picture
    IAmIntractable 204 on at
    New Analysis Engine
     
    Apologies for my delayed response:
     
    1) I was not disputing that the things that were being flagged as circular references are in fact circular references. I am asking why they are suddenly being flagged? The references previously worked just fine so are they really an issue for the engine? There have been many posts about this issue and it tends to cause many more errors to be thrown making it hard to isolate the specific code that is bad. All I am suggesting that you have a look to see if the engine is being too strict.
     
    2) Can you clarify this statement you made: "If you have apps that aren't being worked on, but are still used, they won't be affected until the next time they're edited in studio.". Did you mean to say "Worked on in the studio and Published"? What we all want to know is whether or not the new engine will will cause published apps to fail. I presume that once the new engine is turned on in the maker and then the app is published, a different version of the player will be used. But if we never republish the app, will the already published apps run properly indefinitely?

    3) You really need to move these features to General Availability before they can be used. Otherwise they are experimental and no one should be using them for apps: "the goal is to improve authoring performance without folks needing to change their code. It also allows us to build some long-requested features like User Defined Functions (User defined functions, user defined types, and enhanced component properties move forward - Microsoft Power Platform Blog) that were just not possible for us to build with the old analysis engine implementation."
     
    Thanks
  • New Analysis Engine
    Great question. You're exactly right, the goal is to improve authoring performance without folks needing to change their code. It also allows us to build some long-requested features like User Defined Functions (User defined functions, user defined types, and enhanced component properties move forward - Microsoft Power Platform Blog) that were just not possible for us to build with the old analysis engine implementation.

    If you've found places where you need to modify code, please share some examples so we can address that!
  • VeGETzX Profile Picture
    VeGETzX 362 on at
    New Analysis Engine
    @McCall Saltzman
    Thank you for working closely with us to ensure this feature becomes as stable as possible.
     
    Could you kindly clarify the ultimate goal of this feature? Specifically, is the aim of the New Analysis Engine to improve authoring performance while minimizing or eventually removing the need for developers to migrate or adjust existing code? At the moment, it appears that some modifications to existing code are required, and I’d like to understand if the long-term goal is to address this for a smoother experience moving forward.
     
    This question has been raised by my team and customers, and I’d appreciate your insights so I can respond confidently.
     
    Thank you in advance.
  • New Analysis Engine
    @RobDin 
    I'm glad you found a workaround but I agree we need to figure this out. I've still been unable to reproduce the issue, if you're able to reach out to me via email (lesaltzm@microsoft.com), it'd be a huge help in getting this sorted out.
  • RobDin Profile Picture
    RobDin 58 on at
    New Analysis Engine
    McCall_Saltzman

    In the meantime, I've coded around the issue by moving the determination of the Gates collection to the server side. I now have a view called V_Gates that basically runs:
     
     SELECT DISTINCT Location
     FROM Reads
     
    It's a workaround that adds a slight amount of overhead on the Azure SQL Server, but it's better to be able to control stupidity than be the victim of it. 
     
    Please let me know if Microsoft developers figure this one out.
  • New Analysis Engine
    @BaptisteW, Thanks for the report. This issue appears to be one we're aware of, with the GroupBy statement. Under the hood, it's the same issue as the ShowColumns one that other posters have mentioned, and should be fixed in in version 3.25013. 
     
    @RobDin, thanks. Trying to repro the issue, I'll let you know if we need anything more. 
  • RobDin Profile Picture
    RobDin 58 on at
    New Analysis Engine
    @McCall_Salzman I've been playing around with the different options to populate the Gates collection. 
     
    Doing this: ClearCollect(Gates,Sort(Distinct(Reads,PlateState),Value,SortOrder.Ascending));
     
    Produces the expected result (a collection of all PlateState in the first 2000 results). The usage of Location appears to be the problem.
     
    If I create a collection from the Reads table called Reader I get a collection with 2000 records with every column populating data and each instance of 'Gate 1', 'Gate 2', and 'Gate 3' are in these results.
     
    Then if I execute: 

    ClearCollect(Gates,Sort(Distinct(Reader,Location),Value,SortOrder.Ascending));

    Then if I look at the Reader collection, there are 2000 rows of 'Gate 1' and no other columns are populating.
  • BaptisteW Profile Picture
    BaptisteW 95 on at
    New Analysis Engine
    Hi, I got an error using the new engine which I did not have with the old one.
     
    Here is a code that tries to generate a list of parking slots from a range.
     
    ClearCollect(
        colParkingLanes;
        ForAll(
            GroupBy(
                ForAll(
                    ParkingLanes;
                    {
                        LaneName:ThisRecord.LaneName;
                        Range:ThisRecord.Range
                    }
                );
                LaneName;
                LaneInfos
            ) As groupedLane;
            {
                LaneName:groupedLane.LaneName;
                PlacesRange:ForAll(
                    groupedLane.LaneInfos As infos;
                    infos.Range
                )
            }
        )
    );;
     
    Clear(colParkingPlaces);;
     
    ForAll(
        colParkingLanes As lane;
        Notify("lane:" & lane.LaneName);; // displays the right name
        ForAll(
            lane.PlacesRange As range; // weird Blank value here
     
            Notify("range.Value: " & range.Value);;
     
           
            With(
                {
                    rangeParts: Split(
                        Substitute(
                            range.Value;
                            ".";
                            ","
                        );
                        "-"
                    )
                };
                Notify("First(rangeParts).Value: " & First(rangeParts).Value);;
                With(
                    {
                        min: Round(
                                Value(
                                    Right(
                                        First(rangeParts).Value;
                                        Len(First(rangeParts).Value) - 1
                                    ) * 100
                                );
                                0
                            )
                        ;
                        max: Round(
                                Value(
                                    Right(
                                        Last(rangeParts).Value;
                                        Len(First(rangeParts).Value) - 1
                                    ) * 100
                                );
                                0
                            )
                    };
                    RemoveIf(colPlacesCurrent; true);;
                    ForAll(
                        Sequence(
                            Abs(max - min) + 1;
                            min;
                            1
                        ) As diff;
                        Collect(
                            colPlacesCurrent;
                            Concatenate(lane.LaneName;
                                Substitute(
                                    Left(
                                        Concatenate(
                                            diff.Value/100;
                                            "0"
                                        );
                                        4
                                    );
                                    ",";
                                    "."
                                )
                            )
                        )
                    )
                )
            );;
            Collect(
                colParkingPlaces;
                {
                    lane:lane.LaneName;
                    places:colPlacesCurrent
                }
            );;
           
        )
    );;
     
    Let's say we have a range = "P1.01-P1.13", this should generate a list of slots ["P1.01"; "P1.02"; ... ; "P1.13"]


    Now I get an error saying that the 2nd parameter of my Right() function is wrong (in the Max scope).
     
    After digging a bit into it, I noticed that my "lane.PlacesRange" is Blank even though my collection isn't empty and the lane is known.

    BTW: can we expect the new engine to allow us to use more than 2 nested galeries?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard

Featured topics