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

optimizing DOM manipulation in activity.js #4467

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Commanderk3
Copy link
Contributor

@Commanderk3 Commanderk3 commented Feb 27, 2025

This PR focuses on optimizing the handling of DOM elements in activity.js file.
issue: #4461

Currently, in activity.js, many DOM elements are repetadely accessed uncessaarily; this makes the browser traverse DOM tree again and again, resulting in bad performance.

I am thinking of following these steps :->

  1. To minimize Direct DOM Access
  2. Instead of updating the DOM element multiple times in a loop, build changes first and apply them in one go.
  3. Using more external CSS.
  4. Efficient DOM traversal.

Copy link

✅ All Jest tests passed! This PR is ready to merge.

Copy link

✅ All Jest tests passed! This PR is ready to merge.

Copy link

✅ All Jest tests passed! This PR is ready to merge.

@Commanderk3
Copy link
Contributor Author

@apsinghdev what are your thoughts on this?

@apsinghdev
Copy link
Contributor

@Commanderk3 I think we should first discuss how can we measure the impact of our changes. The dom changes are huge and we'd need a way to measure the result of our changes so that we know we are on the right path.

@Commanderk3
Copy link
Contributor Author

@apsinghdev Yes, absolutely! Let's discuss this in the next meet. Till then I will try to come up with some more ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants