Skip to content

fix(windows): unblock startup cache preparation - #136

Merged
alan7383 merged 4 commits into
alan7383:masterfrom
ilgiova237:fix/windows-startup-cache-preparation
Nov 15, 2026
Merged

alan7383 merged 4 commits into
alan7383:masterfrom
ilgiova237:fix/windows-startup-cache-preparation

Conversation

@ilgiova237

@ilgiova237 ilgiova237 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

the existing windows startup-cache helper failed on the test image: recording exceeded its two-minute cutoff, and assembly exceeded windows' command-line limit in the long image path. locked temporary files could mask the original error.

this uses utf-8 java argument files, adds a configurable ten-minute process timeout, retains partial timeout diagnostics, and makes cleanup locks warnings. existing cache/config files are still replaced only after assembly and validation succeed. no application or ui code changes.

the fixed helper completed actual preparation and strict cache validation locally. enabling the existing aot cache on an unchanged copy of the installed 1.5.1 package produced:

measurement cache off cache on reduction
median startup, 10 launches each 8.837 s 4.688 s 46.9%
slowest observed launch 10.563 s 4.980 s 52.9%

cache-on was faster in all 10 matched pairs. the median saving was 4.15 seconds. these results measure enabling the existing cache with the preparation workflow fixed; they are independent of #132 and do not include its device-probe change.

two excluded warmups, ten alternating pairs, fresh processes and warm filesystem caches. both variants used the same exe, runtime, jars, renderer and synthetic guest state; http used a refused loopback proxy. the endpoint required a first-draw marker from the main screen plus a visible win32 window in the launcher's process tree, polled every 25 ms. device-probe helpers were allowed to finish between launches. all 20 measured samples are retained. the load gate paused before the last baseline; that single remaining launch was resumed with the same image and seed after verifying the artifact hashes. the earlier validation run is not included in these figures.

four process-level helper tests pass locally and in windows ci. the unchanged helper fails both the long-argument and locked-cleanup regression cases. tests also cover unicode paths, preservation on assembly failure and timeout diagnostics. actual recording took about 139 seconds on this laptop, beyond the old limit.

this is a one-time explicit preparation step using the matching jdk, not work added to every launch. the archive is about 100 mib and needs preparing again after jar updates/re-extraction; normal startup falls back automatically if it is missing or incompatible. no cold-disk, online-feed, playback or cpu-percentage claim is made. the user's installed copy was not modified.

reproduction and methodology: experiments/windows-startup-cache/README.md.

all measured samples and artifact hashes
pair cache off, ms cache on, ms
1 9238.438 4980.271
2 7608.787 4757.637
3 9311.052 4662.383
4 10562.959 4749.981
5 8937.146 4446.131
6 9616.270 4577.906
7 8446.764 4699.915
8 8564.630 4409.673
9 8472.612 4769.301
10 8736.461 4676.251
  • executable_sha256: 1a6cc1e347af0c70fee55914182861daef5186b1924d8ae59116126d30d44c69
  • aot_sha256: 5215050d6fc0404e655c0f8d97d32e6fda0b2d5d7e2536c701848997ef75893a
  • app jar KittyTuneWindows-1.5.1.jar: e534046be028cff2a3b6e735622905c380764acdb86a837f03c5166616918c12

@ilgiova237
ilgiova237 marked this pull request as ready for review November 15, 2026 15:41
@alan7383

Copy link
Copy Markdown
Owner

AOT cache preparation triggered two blue screens on my RX 7700 XT. Both dumps pointed to the AMD driver while Java was loading a native DLL, likely from JavaCPP’s deeply nested cache path.
This commit moves the training profile to a shorter temp path. On the same PC, cache preparation completed and KittyTune loaded the cache on two launches without a blue screen.

@alan7383
alan7383 merged commit 68df225 into alan7383:master Nov 15, 2026
1 check passed
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