Skip to content

refactor(ChunkScanner): skip empty chunk section, clear before load#8613

Merged
MukjepScarlet merged 4 commits into
nextgenfrom
refactor/chunk-scanner
Jul 6, 2026
Merged

refactor(ChunkScanner): skip empty chunk section, clear before load#8613
MukjepScarlet merged 4 commits into
nextgenfrom
refactor/chunk-scanner

Conversation

@MukjepScarlet

Copy link
Copy Markdown
Contributor

No description provided.

@liquidbounce-support-bot

Copy link
Copy Markdown

Thanks for the refactor, @MukjepScarlet! A couple of things worth a look before a maintainer reviews:

  • scanChunkSections no longer awaits the section scans. The old code collected the jobs and .joinAll()ed them, so the suspend fun only returned once every section had been scanned. The new version wraps the loop in coroutineScope { … } but still launches each job on the object-level scope (scope.launch { … }), so those coroutines aren't children of the coroutineScope and aren't awaited — the function returns as soon as the loop finishes dispatching. If the intent is to keep the join behaviour, launch on the coroutineScope receiver (or collect + joinAll); if fire-and-forget is intended, the coroutineScope wrapper is a no-op and can go.

  • The ChunkLoad change is broader than the title. Adding it.clearChunk(chunk.pos) before chunkUpdate (for the replaced-chunk case) is a behaviour change beyond "skip empty chunk section" — might be worth calling out in the PR description so reviewers don't miss it.

Everything else (the hasOnlyAir() skip and the suspend (CoroutineScope) -> Unit interface) reads cleanly. Leaving the real review to the maintainers.


🤖 Automated support reply — a human maintainer will review if this doesn't help.

@MukjepScarlet MukjepScarlet changed the title refactor(ChunkScanner): skip empty chunk section refactor(ChunkScanner): skip empty chunk section, clear before load Jul 6, 2026
@MukjepScarlet MukjepScarlet merged commit fc8688f into nextgen Jul 6, 2026
4 checks passed
@MukjepScarlet MukjepScarlet deleted the refactor/chunk-scanner branch July 6, 2026 10:37
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