Skip to content

✨ Enhance performance logging in snapshot and serialization processes #1950

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

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

Conversation

ninadbstack
Copy link
Contributor

This pull request focuses on enhancing performance tracking and debugging capabilities in the DOM serialization process. Key changes include adding performance metrics to the serialized output, tracking the number of cloned nodes, and improving logging for snapshots. These updates aim to provide better insights into the performance and behavior of the DOM serialization process.

Enhancements to performance tracking:

  • packages/dom/src/serialize-dom.js: Added performance timing to measure the duration of the DOM serialization process (serializationTime) and included it in the perfInfo object of the serialized output. The perfInfo object also tracks the number of cloned nodes (clonedNodeCount), the length of the final HTML (finalHtmlLength), and the number of resources (resourceCount). [1] [2] [3]

Improvements to debugging:

  • packages/core/src/discovery.js: Enhanced the debugSnapshotOptions function to log performance information (perfInfo) from the domSnapshot object, if available.

Code updates for node cloning:

  • packages/dom/src/clone-dom.js: Incremented a new clonedNodeCount property in the ctx object to track the number of cloned nodes during the DOM serialization process.

Miscellaneous:

@ninadbstack ninadbstack requested a review from a team as a code owner August 1, 2025 12:01
@ninadbstack ninadbstack added the 🧹 maintenance General maintenance label Aug 1, 2025
Copy link

This PR is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the 🍞 stale Closed due to inactivity label Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 maintenance General maintenance 🍞 stale Closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant