Skip to content

Cache display flags and defer block snapshots - #889

Closed
WarnDa wants to merge 3 commits into
LMBishop:masterfrom
WarnDa:perf/task-progress-lookups
Closed

WarnDa wants to merge 3 commits into
LMBishop:masterfrom
WarnDa:perf/task-progress-lookups

Conversation

@WarnDa

@WarnDa WarnDa commented Nov 9, 2026 •

Copy link
Copy Markdown
  • Reuse the existing QuestsConfig cache for the four actionbar/bossbar display flags.
  • Read Block.getType() directly and defer block snapshots until legacy data matching needs them.

Reload refreshes cached flags; direct FileConfiguration edits no longer update these flags immediately.

Validated: Java 25 build, 3 existing tests and 8 local matcher checks. No added test files or dependencies.

Final patch 34e1446 versus upstream a1f06d5: Paper 1.21.11, Java 25, 50 bots with 1,000 active quests each, stone breaks every 250 ms, progress displays disabled. One A/B pair, 30 s warmup and 60 s capture per run; both runs validated 11,750 breaks and 11,750,000 task increments.

Measurement Before After
Mean MSPT 3.812 2.597
p95 tick duration, ms 21.259 8.078
Quests main-thread stack-sample estimate, ms/break 0.4536 0.2622

Spark: before / after.

Single-pair stress result, not a guaranteed production gain. Java sampler at 2 ms; stack-sample estimates are not CPU measurements.

@WarnDa
WarnDa marked this pull request as ready for review November 12, 2026 10:59
@WarnDa WarnDa changed the title Avoid repeated lookups during task processing Cache display flags and defer block snapshots Nov 13, 2026
@WarnDa WarnDa closed this Nov 14, 2026
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.

1 participant