Skip to content

Deprioritize tasks instead of cancelation #18

@programmerr47

Description

@programmerr47

Currently all tasks, that are in queue to be executed will be canceled, if new url for the same target will be requested.

There is wish to not cancel them but "deprioritize" them. The reason is to load bitmap and keep it if possible for the future reuse. But we need to load it only after all prioritized tasks are completed.

So the algorithm is next (for deprioritized task):

  • wait until all prioritized tasks will be executed
  • check the memory cache
  • run loading task
  • put in the cache only if there is space. otherwise abort it

Instead of just putting an image into cache, we need to check first, is there any space. Because reprioritized tasks are for bitmaps, that are not shown right now and thus not needed to by placed on cache right now, because you can remove some prioritized bitmap from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions