Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6510

ValueProviders are invoked twice initially in M6 apps

XMLWordPrintable

    • Maintenance 40
    • 3

      M6 UI apps trigger double invocation of column's ValueProviders, caused by Vaadin's default drag-and-drop support.

      Legit data fetching invocation

      Invoking personalization descendants
      	at info.magnolia.personalization.variant.PersonalizedDescendantsVisitor.hasPersonalizedDescendants(PersonalizedDescendantsVisitor.java:75) ~[magnolia-personalization-core-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.isPersonalized(VariantAwareTitleColumnDefinition.java:106) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.lambda$apply$0(VariantAwareTitleColumnDefinition.java:92) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at com.machinezoo.noexception.CheckedExceptionHandler.run(CheckedExceptionHandler.java:1709) [noexception-1.4.4.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.apply(VariantAwareTitleColumnDefinition.java:64) [magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.apply(VariantAwareTitleColumnDefinition.java:47) [magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at com.vaadin.ui.Grid$Column.generateRendererValue(Grid.java:1111) [vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.ui.Grid$Column.access$1100(Grid.java:849) [vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.ui.Grid$Column$1.generateData(Grid.java:898) [vaadin-server-8.9.4.jar:8.9.4]
      

      Additional DnD invocation

      Invoking personalization descendants
      	at info.magnolia.personalization.variant.PersonalizedDescendantsVisitor.hasPersonalizedDescendants(PersonalizedDescendantsVisitor.java:75) ~[magnolia-personalization-core-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.isPersonalized(VariantAwareTitleColumnDefinition.java:106) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.lambda$apply$0(VariantAwareTitleColumnDefinition.java:92) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at com.machinezoo.noexception.CheckedExceptionHandler.run(CheckedExceptionHandler.java:1709) ~[noexception-1.4.4.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.apply(VariantAwareTitleColumnDefinition.java:64) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at info.magnolia.pages.app.browser.column.VariantAwareTitleColumnDefinition$ValueProvider.apply(VariantAwareTitleColumnDefinition.java:47) ~[magnolia-personalization-pages-2.0.5-SNAPSHOT.jar:?]
      	at com.vaadin.ui.components.grid.GridDragSource.lambda$null$0(GridDragSource.java:73) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at java.util.ArrayList.forEach(ArrayList.java:1510) ~[?:?]
      	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1087) ~[?:?]
      	at com.vaadin.ui.components.grid.GridDragSource.lambda$new$6646ebc5$1(GridDragSource.java:71) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at com.vaadin.ui.components.grid.GridDragSource.lambda$generateDragData$2(GridDragSource.java:164) ~[vaadin-server-8.9.4.jar:8.9.4]
      	at java.util.HashMap.forEach(HashMap.java:1425) ~[?:?]
      	at com.vaadin.ui.components.grid.GridDragSource.generateDragData(GridDragSource.java:163) ~[vaadin-server-8.9.4.jar:8.9.4]
      

      This can seemingly be worked around, PR incoming. This should at least get M6 apps loading times on par with M5 apps.

        Acceptance criteria

              mgeljic Mikaël Geljić
              mgeljic Mikaël Geljić
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h 13m
                  1h 13m