Repository navigation
perf: hourly death reconcile off the map's hour, character IDs without exceptions - #226
Draft
XxFran10xX wants to merge 1 commit into
Draft
XxFran10xX wants to merge 1 commit into
XxFran10xX wants to merge 1 commit into
Conversation
…t exceptions The hourly death reconcile ran on the same tick as the hourly vehicle decay, the minute timers and (around then) MapSystem's full map update: 0.45 s on one Main tick each hour. Its first run is now 30 min 30 s and 11 ticks after start (same hourly period), off every other startup timer. Members.characterId rejects keys that are not 36 characters with dashes at 8/13/18/23 before parsing. Only such keys can equal a UUID's own string, so results are identical, but the reconcile's walk over every realm string no longer throws and fills a stack trace per non-ID string (0.2 s on Main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Why
Main spark profiles (11-04) show one ~0.45 s tick every hour at restart + 1 h:
CharacterDeaths.reconcile(224 ms), mostlyFactionDeaths.collectKeys→Members.characterId, which threw and filled a stack trace for every non-ID string in every realm snapshot (~70 ms infillInStackTracealone).MapSystem.queueAllNations → updateMap(231 ms: faction saves and exports), plus the hourly vehicle decay and the 1- and 5-minute timers, all on the same tick.Changes
Members.characterIdreturns null for any key that is not 36 characters with dashes at 8/13/18/23 before parsing. Only that shape can equal a UUID's own string, so results are identical. A new test checks the dash fact over every UTF-16 character, every length 0–72, and the lenient formsUUID.fromStringaccepts, against the old logic.Not changed
The daily settlement (1.3 s on Main) was investigated and left alone. The province recalculation must run after the day preparation, inactivity arming and route reset on the same tick to give an identical result, and the durable writes are an ordered chain that is already parallel within each batch.
Testing
mvn verifyon Windows: the same 28 Windows-only failures as unmodified main (directory fsync); no new failures. Linux CI is authoritative.Dev test
Dev (TFMCDev01, 11-05, spark 16:13–17:14):
CharacterDeaths.reconcileat 16:43 (start + 30.5 min, 4 ms, nofillInStackTraceunder it);MapSystem.queueAllNationsand vehicle decay at 17:12–17:13 (nation.jsonrewritten 17:13:26). Member lists and faction menu normal; no new SF warnings.🤖 Generated with Claude Code