Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Answered

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
    119 on at
    New Analysis Engine
    Hi, I don't know if this is due to the NAE, however I get a weird and random behaviour:
     
    I have a dataverse table TVV_Default_Associations, with LookUp columns "Alimentation", "Modele"... which are stored in other tables like "Field_Alimentation", "Field_Modele" and so on.
     
    The goal is to set the fields comboboxes default values based on the selected TVV value from a combobox. Some fields can be modified (DisplayMode.Edit) while some others cannot (DisplayMode.View).
     
     
    - cboFieldTVV
     
    Items: 
    Sort(
        TVV_Default_Associations;
        TVV;
        SortOrder.Ascending
    )
     
    OnChange:
    If(
        Self.Selected.TVV <> ThisItem.TVV.TVV;
        Patch(
            colVehiclesToAdd;
            ThisItem;
            {
                Modele: Self.Selected.Modele;
                FamilleIP: Self.Selected.Famille_IP;
                TVV: Self.Selected
            }
        );;
        Reset(cboFieldTransmission);;
        Reset(cboFieldT8C);;
        Reset(cboFieldMoteur);;
        Reset(cboFieldModele);;
        Reset(cboFieldAlimentation);;
        Reset(cboFieldSilhouette);;
    )
     
     
    - cboFieldAlimentation (can be modified)
     
    Items:
    Sort(Field_Transmissions;Name;SortOrder.Ascending)
     
    DefaultSelectedItems:
    [ThisItem.TVV.Transmission] (seems to be the issue, nested LookUp => have a look at the end of this post)
     
    DisplayMode:
    View
     
     
    - cboFieldModele
     
    Items:
    Sort(Field_Modeles;Name;SortOrder.Ascending)
     
    OnChange:
    If(
        Self.Selected.Name <> ThisItem.Modele.Name;
        Patch(
            colVehiclesToAdd;
            ThisItem;
            {
                Modele:  If(!IsBlank(Self.Selected); Self.Selected; Defaults(Field_Modeles))
            }
        )
    )
     
    DefaultSelectedItems:
    [ThisItem.Modele]
     
    DisplayMode:
    Edit
     
     
    The Alimentation isn't updated when the TVV changes, while fields in Edit mode are updated.
     
    I tried adding this label:
    $"TVV : {ThisItem.TVV.TVV},
    Alim : {ThisItem.TVV.Alimentation.Name},
    Transmission : {ThisItem.TVV.Transmission.Name},
    Moteur : {ThisItem.TVV.Moteur.Name},
    Silhouette : {ThisItem.TVV.Silhouette.Name},
    "
     
    Values are blank, however it worked once (no idea why it stopped working)
    Notice that it works if I replace the DefaultSelectedItems property with this:
    [LookUp(TVV_Default_Associations; TVV = ThisItem.TVV.TVV).Transmission]
  • bpg Profile Picture
    14 on at
    New Analysis Engine
    I'm also affected by the issue with Gallery.AllItemsCount on numerous places in my app. Same symptoms as described before: Highlighting the collection in Studio shows the expected and correct result, highlighting in Studio Gallery.AllItemsCount used in a label shows the expected and correct result, but the runtime calculates "0".
     
     
    @Microsoft: Is someone working on a fix? Do you know the root cause? Or would it help to provide the app as an example?
     
    Btw, using CountRows(Gallery.AllItems) doesn't make a difference. If the underlying collection of items of the gallery changes, the value of Gallery.AllItemsCount or CountRows(Gallery.AllItems) doesn't.
  • BaptisteW Profile Picture
    119 on at
    New Analysis Engine
    Just faced this: https://www.reddit.com/r/PowerApps/comments/1igpesf/entire_app_formulas_area_keeps_getting_cleared/

    I started my app this morning after leaving it overnight, and I just noticed the Formulas property got cleared.
    I tried to restore my app to a previous version, the field remains empty. Will try an even older version when PowerApps lets me ("Restore failed. <My app> is locked by <me>")
  • IAmIntractable Profile Picture
    245 on at
    New Analysis Engine
    Under the new analysis engine, the HTML control renders differently in the player from what is seen in the maker. The fonts are wider causing unwanted wrapping.
  • BK-28031812-0 Profile Picture
    2 on at
    New Analysis Engine
    I too have experienced issues with AllItemsCount and CountRows( Gallery.AllItems ). Some other issues I have found...
     
    I had a gallery with items set to a collection, no filtering and the gallery was blank. Highlighting the collection would show the preview of all the items correctly and in other spots the collection was read and used without issues. But the one gallery still showed 0 items.
     
    Also visibility was thrown off. I had 3 buttons that appeared if approvalItem.ID in Gallery.AllItems.ID and of the 3 buttons they some would show or not show independently of each other. Same code, but one would show and the other two would not or any other combination.
     
    These are single examples of several I found for each. I turned off the new analysis engine for now and no issues since.
  • IAmIntractable Profile Picture
    245 on at
    New Analysis Engine
    I can also report that .AllItemsCount also does not seem to report the count properly depending on the context. It seems more accurate to .CountRows the rows in the underlying collection if one is used. If the items property is based on a datasource, then the .AllItemsCount does not seem stable enough to utilize. 
  • ShantanuP Profile Picture
    on at
    New Analysis Engine
    @PM-26031830-0, Sorry to hear about the issue that you are running into this. Have you tried adding a label with that expression?

    Label1.Text = 
       CountRows(galClients.AllItems)

    What value do you see in this case? Is it possible for you to share monitor trace for this issue to CanvasAppAnalysis@service.microsoft.com?

    What other places do you see the app breaks? 
     
  • PM-26031830-0 Profile Picture
    2 on at
    New Analysis Engine
    Starting today our app no longer works with the new analysis engine.   It was fine up until today.

    What we've noticed is that the NAE is no longer properly processing statements.  For example a simple visible property of the code:
     
    If(
        CountRows(galClients.AllItems) = 0,
        true,
        false
    )

    If I hover this in the editor window it says "galClient.AllItems = 100" but is still showing the control in question.
     
    If I turn off the NAE and reload the app, everything works fine.  If I turn it back on again, the app breaks in MULTIPLE places.  If this NAE is forced on, it will currently kill our app used by a LARGE number of employees.
  • ShantanuP Profile Picture
    on at
    New Analysis Engine
    Hello @siers,
    What is curUserDetails? How is this value populated? If you have a repro app or scoped smaller repro which you can share with us at CanvasAppAnalysis@service.microsoft.com then that would help us to investigate and fix this issue.

    It would also help if you can run monitor trace on published app until the point you hit the issue and share the trace with us.

    Thanks!
  • Jonathan Rogers Profile Picture
    27 on at
    New Analysis Engine
    Just an observation, and I promise I'm not trying to stir the pot, but I feel like the NAE has a bigger purpose than what has been mentioned. There are currently two features that are not allowed unless the NAE is turned on, one of them being automated renaming of Text Label controls with copilot and another is User-Defined Formulas.

    Is this overhaul really just to enable the ability for copilot to interface more with the code and functionality within the app? It would explain the big push, even at the expense of things working correctly.
     
    I totally get the need for cleaning up technical debt and making improvements to code to make things better, AND I know that often comes with growing pains...
     
    However, and a big however, it shouldn't be at the expense of so many unexpected and unexplainable bugs across so many different types of apps.
     
    I personally would rather my app take 5 minutes to load and work as expected than to have it load in half that time and not know whether something is a bug or just the NAE with no way to fix it.
     
    As a heavy canvas power apps user, it is more important to me that the code itself functions correctly than to have improved system performance or copilot capabilities - unless - there is more confidence across the board that current functionality and code work as expected.
     
    I do appreciate your dedicated focus to try and make this work for all of us and for trying to figure out what was happening to our app specifically. I truly do want this to work for everyone, but I still believe that this shouldn't be forced until it is fully ready for prime time.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics