Commit b9e20ba
committed
Reject empty replay files before WebGL loading churn
High-frequency replay switching included a zero-byte sample, which could still enter the browser-to-Unity load path and add avoidable request, parse, status, and GC churn during stress. The bridge now treats an explicitly reported zero-size file as an immediate player-facing failure while leaving normal URL callers without size metadata untouched.
Constraint: Competition package stability favors a narrow Playback-side fix over a replay parser rewrite.
Rejected: Revoke blob object URLs from Unity after terminal load | stress testing showed this can make high-frequency blob loads less stable.
Rejected: Abort and dispose active UnityWebRequest from PreparePlaybackLoad | stress testing showed this can worsen WebGL hangs under rapid blob switching.
Confidence: medium
Scope-risk: narrow
Directive: Do not add aggressive blob revocation or UnityWebRequest disposal on the C# side without rerunning high-frequency WebGL replay stress.
Tested: dotnet format whitespace --folder interface/Unity/Unity-Playback/Assets/Scripts --verify-no-changes
Tested: Unity batchmode WebGL Playback build via WebGLBuildScript.BuildWebGL
Tested: Playback zip extracted and SHA256-compared against interface/Unity/Unity-WebGL/playback, 17/17 files matched
Tested: Three headless Chrome WebGL stress rounds, 80 random rapid loads each across playback (2), playback (1), and playback.thuaipb, no JS exceptions or permanent hang
Not-tested: Full lazy/streaming replay parser redesign for eliminating 3-5 second main-thread parse long tasks1 parent 43bfa5b commit b9e20ba
6 files changed
Lines changed: 22 additions & 4 deletions
File tree
- interface/Unity
- Unity-Playback/Assets/Scripts/WebGL
- Unity-WebGL
- playback
- Build
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
231 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
232 | 250 | | |
233 | 251 | | |
234 | 252 | | |
| |||
264 | 282 | | |
265 | 283 | | |
266 | 284 | | |
267 | | - | |
| 285 | + | |
268 | 286 | | |
269 | 287 | | |
270 | 288 | | |
| |||
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments