Skip to content

perf: Improve collection-repeat image performance on iOS #3194

@ajoslin

Description

@ajoslin

Problems:

  • Setting an un-cached url to an img src gives a 50-200ms freeze on an iPhone 6.
  • iOS UIWebView doesn't properly cache remote image urls. Even after setting once to a url, setting again to the same url will cause a noticeable freeze.

Solutions:

  • Use a web worker to fetch image srcs, convert them to base 64, and give them back as a data-uri.
    • This works.. almost. Once an image has been set to a data-uri once, the WebView does properly cache the uri and reloads it instantly when it's set the next time.

The last solution needed is a way to cache the data uri into the webview beforehand. This will require some experimentation, but it's doable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions