Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't limit display size for tiles stored as SQLite DB #21316

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

nazar-kutz
Copy link
Contributor

@nazar-kutz nazar-kutz commented Nov 12, 2024

This request has to fix problem described here: #21252 (comment)

The problem comes from the new conditions we set to calculate the size of the tiles (Issue: #20974), however we shouldn't set these limits for tiles those are stored as one SQLite file, because there is only one file and it calculates anyway.

@nazar-kutz nazar-kutz linked an issue Nov 12, 2024 that may be closed by this pull request
@@ -104,8 +104,7 @@ private void addLiveItem(@NonNull LocalCategory category, @NonNull File file, @N
}

private void addSeparatelyCalculationItemIfNeeded(@NonNull LocalItem item) {
LocalItemType type = item.getType();
Long limit = rules.getCalculationSizeLimit(type);
Long limit = rules.getCalculationSizeLimit(item);
if (limit != null && !separateSizeCalculationItems.contains(item)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if we return limit or -1?

if (localItem.getType() == TILES_DATA) {
File file = localItem.getFile();
boolean isSQLite = file.getName().endsWith(IndexConstants.SQLITE_EXT);
return !isSQLite ? TILES_SIZE_CALCULATION_LIMIT : -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be single line

@Chumva Chumva merged commit a56e43b into r4.9 Nov 12, 2024
3 checks passed
@Chumva Chumva deleted the DisplayAllSizeForSqliteTiles branch November 12, 2024 16:29
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.

Opening Maps & Resources / Local takes very long
2 participants