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

LazyImage: cache blurhash #2

Closed
jmsche opened this issue Dec 3, 2020 · 2 comments · Fixed by #1755
Closed

LazyImage: cache blurhash #2

jmsche opened this issue Dec 3, 2020 · 2 comments · Fixed by #1755

Comments

@jmsche
Copy link
Contributor

jmsche commented Dec 3, 2020

The docs say:

You should try to generate small BlurHash images as generating the image can be CPU-intensive.

So it would be nice if the hashes could be cached somehow :)

@nicolas-grekas
Copy link
Member

Good idea. Up for a PR @jmsche?

@jmsche
Copy link
Contributor Author

jmsche commented Jan 11, 2021

Unfortunately I can't for now :/

dunglas referenced this issue in dunglas/ux Mar 2, 2021
ci: add PHP-CS-Fixer and PHPStan
nicolas-grekas pushed a commit to nicolas-grekas/ux that referenced this issue Mar 26, 2021
Add $options to BroadcastListener::broadcast()
weaverryan added a commit that referenced this issue Nov 1, 2022
# This is the 1st commit message:

WIP heavy refactoring to Component

Initial "hook" system used to reset model field after re-render

Adding a 2nd hook to handle window unloaded

reinit polling after re-render

Adding Component proxy

# This is the commit message #2:

fixing some tests

# This is the commit message #3:

Refactoring loading to a hook

# This is the commit message #4:

fixing tests

# This is the commit message #5:

rearranging

# This is the commit message #6:

Refactoring polling to a separate class
daFish pushed a commit to daFish/ux that referenced this issue Jan 26, 2023
# This is the 1st commit message:

WIP heavy refactoring to Component

Initial "hook" system used to reset model field after re-render

Adding a 2nd hook to handle window unloaded

reinit polling after re-render

Adding Component proxy

# This is the commit message symfony#2:

fixing some tests

# This is the commit message symfony#3:

Refactoring loading to a hook

# This is the commit message symfony#4:

fixing tests

# This is the commit message symfony#5:

rearranging

# This is the commit message symfony#6:

Refactoring polling to a separate class
Kocal added a commit to Kocal/symfony-ux that referenced this issue Apr 18, 2024
Kocal added a commit to Kocal/symfony-ux that referenced this issue Apr 18, 2024
Kocal added a commit to Kocal/symfony-ux that referenced this issue Apr 18, 2024
Kocal added a commit to Kocal/symfony-ux that referenced this issue Apr 18, 2024
Kocal added a commit to Kocal/symfony-ux that referenced this issue Apr 18, 2024
@kbond kbond closed this as completed in 21e3c43 Apr 19, 2024
kbond added a commit that referenced this issue Apr 19, 2024
This PR was merged into the 2.x branch.

Discussion
----------

[LazyImage] Cache BlurHash, close #2

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Issues        | Fix #2 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - For new features, provide some code snippets to help understand usage.
 - Features and deprecations must be submitted against branch main.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Hi everyone, this PR is a proposal for #2, the second oldest issue on this repository 🤯

In some weeks at work we want to setup BlurHash images for performance reasons, caching them the first step!

I've also though about decorates the `BlurHashInterface` if option `cache` is set, this way we don't modify the current `BlurHash`. Let me know what is preferred :)

Commits
-------

21e3c43 [LazyImage] Cache BlurHash, close #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants