Skip to content

Reduce memory usage for large icon sets#38

Merged
aerni merged 2 commits into
mainfrom
fix/memory-usage
Apr 9, 2026
Merged

Reduce memory usage for large icon sets#38
aerni merged 2 commits into
mainfrom
fix/memory-usage

Conversation

@aerni

@aerni aerni commented Apr 9, 2026

Copy link
Copy Markdown
Owner

When using a Font Awesome Pro kit with all icon styles enabled, the addon caches 53,665+ icons as serialized PHP objects. Deserializing these on every request costs ~85 MB peak memory, potentially crashing PHP by exceeding the default 128 MB memory limit.

This change caches the JSON response and icon styles separately, avoiding the expensive deserialization on subsequent requests.

Peak memory usage

Before After Reduction
Cold cache 84.6 MB 59.2 MB -30%
Warm cache 84.6 MB 39.2 MB -54%

@aerni
aerni merged commit 77b4790 into main Apr 9, 2026
1 check passed
@aerni
aerni deleted the fix/memory-usage branch April 9, 2026 14:44
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 this pull request may close these issues.

1 participant