Stream crash dumps into diagnostic reports to reduce launcher memory use #438
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/438"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-12-01T16:08:42Z.
The tester in #437 observed 5 GB of launcher memory after a series of reports. I isolated one source of allocation in the v26.12.3 packager. Collecting
ReadAllBytesthrough a PowerShellifexpression enumerates the dump byte by byte before writing it to the ZIP. This change streams dumps into the ZIP and writes the existing screenshot and contact-sheet byte buffers directly.I ran the included test in three fresh PowerShell 7.4.19 processes per version on Linux. Packing a synthetic 4 MiB dump allocated 346.7 MiB on the release and 18.8 MiB with this change each time. Every extracted dump matched the source SHA-256. With a 256 KiB limit, each version omitted the dump and retained the run log. To reproduce, run
pwsh -NoProfile -File tests/report-dump-memory.ps1 -Repo <launcher directory>against each checkout.These measurements cover managed allocations during packaging. The cause of the tester’s sustained 5 GB working set remains unverified.
Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-12-01T16:27:49Z.
I also measured repeated packaging in a single process, closer to the sequence in #437. The test at
49315d1accepts-Repeat 8. I ran three fresh processes per version on Linux PowerShell 7.4.19, each packing the same synthetic 4 MiB dump eight times. The baseline was the launcher from the published v26.12.3 Windows archive.All 48 extracted dumps matched their source SHA-256, and the size-limit retry retained the log in all six processes. These peaks include the PowerShell host and the test. A long Windows session with the tester’s actual reports is still needed to explain the original 5 GB reading.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.