Repository navigation
docs: say that tiles decode on the main thread without a decoder pool - #802
Merged
Merged
Conversation
The fetchTile JSDoc said that without a pool "a new decoder will be created for each tile", and the geotiff README said that workers are created by default. Neither is true: without a pool, or with a DecoderPool that has no createWorker, tiles decode on the main thread. Also fix the summary of Overview.fetchTile, which said it reads the full-resolution image, and COGLayer's pool prop, which named a GeoTIFFLayer that no longer exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
I'm not sure if we should merge this or just fix the default so it uses a thread pool |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Note This comment was written by Claude (Claude Code), not by @kylebarron.
We settled this in chat: main-thread decoding stays the default for Since your comment:
🤖 Written by Claude Code |
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
The docs describe decoding without a worker pool wrongly:
fetchTileandreadJSDoc, on bothGeoTIFFandOverview, says that without apool, "a new decoder will be created for each tile". In fact the tiles are decoded on the main thread.navigator.hardwareConcurrency". ADecoderPoolcreates workers only when it's givencreateWorker. Without one, it decodes on the main thread. The README also never showed how to pass a pool tofetchTile.Main-thread decoding stays the default for
@developmentseed/geotiff; the layers already usedefaultDecoderPool().Changes
fetchTileandreadJSDoc (GeoTIFFandOverview): without a pool, tiles are decoded on the main thread. It linksdefaultDecoderPoolas a pool to pass.Overview.fetchTile's summary said it reads the full-resolution image. It reads the overview.defaultDecoderPool()tofetchTile. Then what happens with no pool, withdefaultDecoderPool(), and with aDecoderPoolthat has nocreateWorker. It namesreadamong the methods that take a pool.Checked
geotiffanddeck.gl-geotiffbuild and typecheck, and Biome is clean on the changed files.{@link defaultDecoderPool}links. It reports the same 17 warnings forgeotiffas onmain.stricton, the README snippet typechecks against this branch's build. PassingdefaultDecoderPoolwithout calling it fails, as it should.🤖 Written by Claude Code