Skip to content

Decouple image compression from image loading #294

Description

@WillyJL
  • images should load in whatever format is available, with preference for selected compression mode (as is currently)
  • compression shouldn't be a prerequisite for loading the image
  • run a thread in background that periodically checks what images arent compressed and compresses them
    • maybe not periodically, but rather run once at startup then keep track of when image files are added/replaced
    • thread will unload a game's image when compression for it is completed
    • we can probably skip compression for preview images, they don't need instantaneous loading, even if its a few seconds it should be fine, and the tradeoff to much higher space usage isnt worth it
  • need to figure out a synchronization method between api/main thread wanting to replace the image, and compression thread compressing the old image
    • maybe a mutex is sufficient, or maybe it should be possible for replacing image to interrupt the compression of the older image
  • maybe imagehelper can keep the prior frames right up until the new ones are ready, to avoid flicker?
    • needs to still discard the old ones if new ones fail loading, so error is shown

Metadata

Metadata

Assignees

Labels

enhancementNew enhancement or requestrelease-pendingThis is done, will be in next release

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions