Skip to content

Potentially add back streamed image decoding #323

@CosmicHorrorDev

Description

@CosmicHorrorDev

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: New feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions