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

Limit internal metadata on multi-source files #1514

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
- Read some untiled tiffs using the tiff source ([#1512](../../pull/1512))
- Speed up multi source compositing in tiled cases ([#1513](../../pull/1513))

### Changes
- Limit internal metadata on multi-source files with huge numbers of sources ([#1514](../../pull/1514))

## 1.28.1

### Improvements
Expand Down
4 changes: 2 additions & 2 deletions sources/multi/large_image_source_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def getInternalMetadata(self, **kwargs):
"""
Return additional known metadata about the tile source. Data returned
from this method is not guaranteed to be in any particular format or
have specific values.
have specific values. Also, only the first 100 sources are used.

:returns: a dictionary of data or None.
"""
Expand All @@ -903,7 +903,7 @@ def getInternalMetadata(self, **kwargs):
'sources': copy.deepcopy(self._sources),
'sourceFiles': [],
}
for path in self._sourcePaths.values():
for path in list(self._sourcePaths.values())[:100]:
source = self._sources[min(path['sourcenum'])]
ts = self._openSource(source)
result['sourceFiles'].append({
Expand Down