Skip to content

Cache: Don't cache Blobs.#32989

Merged
Mugen87 merged 2 commits into
mrdoob:devfrom
Mugen87:dev5
Feb 11, 2026
Merged

Cache: Don't cache Blobs.#32989
Mugen87 merged 2 commits into
mrdoob:devfrom
Mugen87:dev5

Conversation

@Mugen87

@Mugen87 Mugen87 commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

Fixed #32986.

Description

Blob URLs are not stable and change for a given resource every time URL.createObjectURL() is called. This behavior can introduce a memory leak in THREE.Cache since the URLs are part of the cache key.

Because the data of Blob URLs are already located at the client, no network transfer is required. Hence, Cache does not need to honor such URLs.

@github-actions

github-actions Bot commented Feb 10, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.14
85.24
359.14
85.24
+0 B
+0 B
WebGPU 621.16
173.09
621.16
173.09
+0 B
+0 B
WebGPU Nodes 619.74
172.84
619.74
172.84
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 490.85
119.64
490.85
119.64
+0 B
+0 B
WebGPU 694.85
188.15
694.85
188.15
+0 B
+0 B
WebGPU Nodes 644.06
175.54
644.06
175.54
+0 B
+0 B

@Mugen87 Mugen87 added this to the r183 milestone Feb 11, 2026
@Mugen87 Mugen87 merged commit 6e6b02c into mrdoob:dev Feb 11, 2026
10 checks passed
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.

GLTFLoader ImageBitMapLoader with Cache enabled causes memory leak

1 participant