Visual Builder

Get Involved. Join the Conversation.

Topic

    Nandan
    Non-passive event listener
    Topic posted October 23, 2019 by Nandan, tagged Action Flows 
    18 Views, 3 Comments
    Title:
    Non-passive event listener
    Summary:
    Non-passive event listener in Action Chain execution
    Content:

    Hi,

    I see the below console message whenever an action chain is executed. How can I mark an event handler as 'passive' in VBCS?

    I am yet to verify if this is happening for all action chains but I have noticed this in action chains written to handle value change in oj-combo-box and also in oj radio button.

    Log message:

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    oj3rdpartybundle.js:12465 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Regards,

    Nandan

     

    Version:
    19.3.1.2 Runtime version 19.3.1.12

    Comment

     

    • Duncan Mills

      What event are you attaching your action chain to? 

      On something like a radio set the correct way to detect and then react to a change is to use the value property of the control.  a change will trigger an on-value-changed listener as well as updating any variable bound to that property e.g. value="{{ $page.variables.selectedOption }}" which you can also wire an action chain to in case of change.

      • Nandan

        Hi Duncan,

        Yes, I am attaching the action chain to value event. Here's the HTML code of the combo box (one of the affected components, the other one being radioset):

        ------------------------------------------------------------------------------------------------------------

        <oj-combobox-one :id="[['oj-select-combobox-218836124-2-' + $current.index]]"  value="{{ $current.data.stdOpnId  }}" options="[[ $page.functions.getOps($application.variables.inspStepMasterADP.data,$current.data.inspStepId,'recon_op')  ]]" options-keys.label="operation_name" options-keys.value="standard_operation_id"  on-value-changed="[[$listeners.ojSelectCombobox2188361242Value]]">

        </oj-combobox-one>

        -----------------------------------------------------------------------------------------------------------------

        I  found that this is happening only in the upgraded version (19.3.1.12) and is fine in the older release (19.1.3.11). Even if the action chain has no logic in it (other than a call to a dummy JavaScript function), the new version takes 3.5 seconds to execute the action chain while the old version takes only 187 ms. I am trying to isolate this into a simple application so that I can share it here in the forum. I was wondering if there is any related known issue in the latest release.

        Also, here's another line from the console log that I missed in my first post:

        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        oj3rdpartybundle.js:12412 [Violation] Handling of 'wheel' input event was delayed for 1739 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive.

        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        Regards,

        Nandan

    • Duncan Mills

      The performance issue makes me think that the best approach is to log a Support Request on this