fix: perform get tile with known format to reduce requests(MAPCO-8749)#175
Draft
nitzanmorr wants to merge 14 commits intomasterfrom
Draft
fix: perform get tile with known format to reduce requests(MAPCO-8749)#175nitzanmorr wants to merge 14 commits intomasterfrom
nitzanmorr wants to merge 14 commits intomasterfrom
Conversation
This is experimental! might break the cli when using it against s3 and fs
nitzanmorr
commented
Oct 20, 2025
| List<CorrespondingTileBuilder> correspondingTileBuilders = new List<CorrespondingTileBuilder>() | ||
| { | ||
| () => baseData.GetCorrespondingTile(targetCoords, shouldUpscale), | ||
| () => baseData.GetCorrespondingTile(targetCoords, null, shouldUpscale), |
Contributor
Author
There was a problem hiding this comment.
The tile format parameter should not be null, as it would break the cli when using S3 or FS. The format should be a cli argument.
nitzanmorr
commented
Oct 20, 2025
| { | ||
| Tile newTile = newTiles[i]; | ||
| bool baseTileExists = baseData.TileExists(newTile.GetCoord()); | ||
| bool baseTileExists = baseData.TileExists(newTile.GetCoord(), null); |
Contributor
Author
There was a problem hiding this comment.
The tile format parameter should not be null, as it would break the cli when using S3 or FS. The format should be a cli argument.
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.
This PR removes the need to "guess" the tile format when performing a "get" request to s3. So instead of trying to fetch a tile of a certain format, and if it fails - try the other format, now it just fetches the correct format. This reduces requests to s3.
Also made an improvement to the fs client so now instead of searching the entire directory, it reads the correct file directly.