fix(core): optimize report merging for large inline reports#2127
Draft
fix(core): optimize report merging for large inline reports#2127
Conversation
Deploying midscene with
|
| Latest commit: |
12b37d3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://202a7af8.midscene.pages.dev |
| Branch Preview URL: | https://fix-core-report-merge-inline.midscene.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
Merging many large inline HTML reports became noticeably slower after the first several files because each source report was scanned twice and every copied image script reopened the merged output file.
Validation
pnpm run lintnpx nx build @midscene/corepnpm --dir packages/core exec tsc --noEmit -p tsconfig.jsonpnpm --dir packages/core exec vitest run tests/unit-test/report-merge-performance.test.tspnpm --dir packages/core exec vitest run tests/unit-test/merge-browser-parse.test.ts -t "step 2: verify merged report preserves directory mode with screenshots"pnpm --dir packages/core exec vitest run tests/unit-test/report.test.ts -t "should merge 3 mocked reports|should merge directory mode reports and copy screenshots"pnpm --dir packages/core exec vitest run tests/unit-test/report.test.ts -t "should use constant memory when merging reports with large inline images"Notes
This change is intended to be safe for a prepatch release if you want to cut one after review.