Skip to content
New issue

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

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

Already on GitHub? # to your account

Potentially add back streamed image decoding #323

Open
CosmicHorrorDev opened this issue May 4, 2024 · 0 comments
Open

Potentially add back streamed image decoding #323

CosmicHorrorDev opened this issue May 4, 2024 · 0 comments
Labels
C-enhancement Category: New feature or request

Comments

@CosmicHorrorDev
Copy link
Collaborator

With image's new v0.25 release we'll lose out on the streamed image decoding added in #74 (changes to an upstream trait dropped how we turned the decoder into a reader in order to make it object safe)

It's worth noting that once #291 is finished the non-streamed decoding won't be an issue for images loaded from the global cache since they're stored pre-decoded in the format we already expect. That means any images fetched through urls that are either fresh, or have a valid e-tag won't need to be decoded

There's a few things we can do to mitigate things in various ways with widely varying degrees of difficulty (some of which we really ought to do anyways)

  • Limit the amount of large images that we decode simultaneously (have some separate worker pool for it)
  • Use the underlying library for some of the most common formats to support streaming (highly non-trivial)
  • Realistically we should error out on images that would decode above a specific size anyways (it's based off the image's dimensions, not the file size, so it'll have to be some decently large default limit like 256 MiB or so)
@CosmicHorrorDev CosmicHorrorDev added the C-enhancement Category: New feature or request label May 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant