Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not use passive listeners to improve scrolling performance #34158

Open
ia-gaurav opened this issue Sep 25, 2021 · 29 comments · May be fixed by #35613
Open

Does not use passive listeners to improve scrolling performance #34158

ia-gaurav opened this issue Sep 25, 2021 · 29 comments · May be fixed by #35613
Assignees
Labels
Area: Performance Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: PR in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@ia-gaurav
Copy link

Preconditions :

Magento 2.4 latest version

Steps 1: Check you site via google page speed :https://developers.google.com/speed/pagespeed/insights
Steps 2: Check audit report you will see below issues
Does not use passive listeners to improve scrolling performance
Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance. Learn more.
Source
…en_US/jquery.min.js:313:558

Can it be fixed are it is causing issue with mobile perfomace

@m2-assistant
Copy link

m2-assistant bot commented Sep 25, 2021

Hi @ia-gaurav. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@engcom-November engcom-November added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Sep 27, 2021
@mrtuvn
Copy link
Contributor

mrtuvn commented Sep 27, 2021

the fix maybe take times even a years to deploy/merge into codebase
i think you can workarounds and patch with your own way
https://stackoverflow.com/questions/60357083/does-not-use-passive-listeners-to-improve-scrolling-performance-lighthouse-repo
Add web/jquery.js to your theme instead modify core. Add some patch at bottom

@Quazz
Copy link

Quazz commented Sep 28, 2021

Personally I've been using the following patch on jquery for ages:

require(['jquery'], function(jQuery) {
    'use strict';
    (function() {
        jQuery.event.special.touchstart = {
            setup: function(_, ns, handle) {
                this.addEventListener('touchstart', handle, {passive: ns.includes('noPreventDefault') ? true : false});
            }
        };
        jQuery.event.special.touchmove = {
            setup: function(_, ns, handle) {
                this.addEventListener('touchmove', handle, {passive: ns.includes('noPreventDefault') ? true : false});
            }
        };
    }());
});

@mrtuvn
Copy link
Contributor

mrtuvn commented Sep 28, 2021

Add to the file lib/web/jquery/patches/jquery.js

@mrtuvn
Copy link
Contributor

mrtuvn commented Sep 30, 2021

Created pr for jquery newer version here
#34162

@ia-gaurav See my link above

@ia-gaurav
Copy link
Author

@mrtuvn - can u tell what to add in lib/web/jquery/patches/jquery.js

@nkajic
Copy link
Member

nkajic commented Oct 16, 2021

@engcom-Hotel engcom-Hotel self-assigned this Oct 20, 2021
@m2-assistant
Copy link

m2-assistant bot commented Oct 20, 2021

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

@engcom-Hotel
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Oct 21, 2021

Hello @ia-gaurav,

We have checked this issue on the cloud instance, but we are unable to reproduce the issue. The issue you mentioned in the description is not visible on both desktop and mobile reports.

Please let us know if we have missed anything in order to reproduce the issue.

Thanks

@engcom-Hotel engcom-Hotel added Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: needs update Additional information is require, waiting for response labels Oct 21, 2021
@m2-community-project m2-community-project bot removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: ready for confirmation labels Oct 21, 2021
@mrtuvn
Copy link
Contributor

mrtuvn commented Oct 21, 2021

Added solution fix in above link in my comment
#34162

@mrtuvn
Copy link
Contributor

mrtuvn commented Oct 22, 2021

@engcom-Hotel You may not notice this line
passive
At categories Performance

@engcom-Hotel
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

@engcom-Hotel
Copy link
Contributor

@magento give me 2.4.3 instance

@magento-deployment-service
Copy link

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Oct 22, 2021

Hello @mrtuvn,

Thanks for the updates!

I was checking the homepage, the issue is not visible there but inner page the issue can be reproducible. Please have a look at to below screenshot:
image

@ia-gaurav Since the issue is reproducible, we are confirming this issue.

Thanks

@engcom-Hotel engcom-Hotel added Area: Performance Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Oct 22, 2021
@m2-community-project m2-community-project bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Oct 22, 2021
@m2-community-project m2-community-project bot added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: needs update Additional information is require, waiting for response labels Oct 22, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-1541 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Oct 22, 2021

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

@hostep
Copy link
Contributor

hostep commented Oct 22, 2021

@engcom-Hotel: now that you have confirmed this, could you edit your post with those super large images and remove them? Those large images cause issues in our browsers while scrolling through this issue due to taking up a lot of resources while trying to display them. Much appreciated, thanks!

@engcom-Alfa engcom-Alfa added the Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. label Oct 22, 2021
@in-session
Copy link
Contributor

in-session commented Oct 22, 2021

Of course, you always start from Luma, but I think there will be problems with the adaptation of a shop at the latest. Here is an example from my current dev environment.

image
https://stackoverflow.com/a/68489296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: PR in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Pull Request In Progress
Development

Successfully merging a pull request may close this issue.

10 participants