Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Re-add WebImage #349

Open
PoignardAzur opened this issue Feb 10, 2023 · 0 comments
Open

Re-add WebImage #349

PoignardAzur opened this issue Feb 10, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed masonry Issues relating to the Masonry widget layer

Comments

@PoignardAzur
Copy link
Contributor

WebImage was removed for a few reasons:

  • It was added for testing promises, but it wasn't really a core widget and it definitely wasn't important enough to justify the problems it created.
  • It loaded its contents by calling reqwest::blocking::get(url) in a background thread, which isn't ideal for a few reasons:
  • Bad performance.
  • Adding an unnecessary dependency to reqwest that wasn't used anywhere else in the project.
  • That specific function didn't compile on wasm.
  • It relied on ImageBuf::from_data, which caused some build problems because that method wasn't reliably generated depending on feature flags.

I would like to add that type back eventually, with a few caveats:

  • Wait for the transition to glazier (Huge memory consumption from parley::FontCache::new() (1.8 GiB) #24) where we'll hopefully have a better import structure.
  • The type shouldn't use any network code itself. We should use dependency injection and pass a builder function as a parameter instead.
  • We should implement running async functions in the background to avoid having to call reqwest::blocking.
@PoignardAzur PoignardAzur added enhancement New feature or request help wanted Extra attention is needed labels Feb 10, 2023
@PoignardAzur PoignardAzur added the masonry Issues relating to the Masonry widget layer label Apr 19, 2024
@DJMcNab DJMcNab transferred this issue from linebender/masonry Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

1 participant