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

Yellow lab score 'F' : in DOM access for Swiper carousel for React.js #6815

Closed
5 of 6 tasks
ShuvoHabib opened this issue Jul 5, 2023 · 0 comments
Closed
5 of 6 tasks
Labels

Comments

@ShuvoHabib
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://yellowlab.tools/result/gmjix2cly6/rule/DOMaccesses

Bug description

DOM access is "F", which represents the worst as it reads, changes or binds the DOM.

What is DOM Access?

This metric estimates the number of times the JavaScript reads, changes or binds the DOM.
The more your JavaScript code accesses the DOM, the slower the page will load.
Try, as much as possible, to have an HTML page fully generated by the server instead of making changes with JS.
Try to reduce the number of queries by refactoring your JavaScript code.
Binding too many events also has a cost.

Expected Behavior

Very much Less offenders from querySelector() or querySelectorAll()

Actual Behavior

926 offenders from querySelector() or querySelectorAll(). It's so much dependent on DOM

swiper-slide-transform on div.swiper-slide.swiper-slide-next
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide.swiper-slide-active.swiper-slide-visible
.swiper-slide-transform on div.swiper-slide.swiper-slide-next
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide.swiper-slide-visible.swiper-slide-active
.swiper-slide-transform on div.swiper-slide.swiper-slide-next
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide
.swiper-slide-transform on div.swiper-slide

Swiper version

9.1.1

Platform/Target and Browser Versions

Chrome, Safari, Firefox

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
Repository owner locked and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants