Skip to content

Conversation

@AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Nov 5, 2025

Purpose

When investigating about a memory leak during collaboration we found a problem with the interlinking that could cause a memory leak.
When doing collaborative editing, doc?.title might be out of sync for other users when updated by another user.
This can cause a useEffect to run repeatedly, causing an infinite loop of updates.
We now trigger the effect only when doc?.title changes, not when the customInlineContent changes.

Proposal

  • ⚡️(frontend) improve unsubscribe logic when unmounting components
  • 🐛(frontend) fix memory leak in Interlinking
  • 🥅(frontend) improve error handling during upload

@AntoLC AntoLC self-assigned this Nov 5, 2025
@AntoLC AntoLC added bug Something isn't working enhancement improve an existing feature frontend labels Nov 5, 2025
@AntoLC AntoLC force-pushed the fix/interlinking-memory-leak branch from e389602 to abd575a Compare November 5, 2025 10:57
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Size Change: +4.19 kB (+0.11%)

Total Size: 3.68 MB

Filename Size Change
apps/impress/out/_next/static/chunks/pages/_app.js 418 kB +4.13 kB (+1%)
apps/impress/out/_next/static/f00450c8/_buildManifest.js 0 B -882 B (removed) 🏆
apps/impress/out/_next/static/54a9d4f2/_buildManifest.js 882 B +882 B (new file) 🆕

compressed-size-action

@AntoLC AntoLC requested a review from lunika November 5, 2025 12:27
We can now unsubscribe on the editor events,
improving performance and preventing memory leaks.
When doing collaborative editing, doc?.title might
be out of sync for other users when updated by
another user.
This causes the useEffect to run repeatedly,
causing an infinite loop of updates.
We now trigger the effect only when doc?.title changes,
not when the customInlineContent changes.
Catch and log errors when replacing blocks during
file upload.
@AntoLC AntoLC force-pushed the fix/interlinking-memory-leak branch from abd575a to f9ff578 Compare November 6, 2025 12:23
@AntoLC AntoLC merged commit f9ff578 into main Nov 6, 2025
20 of 22 checks passed
@AntoLC AntoLC deleted the fix/interlinking-memory-leak branch November 6, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement improve an existing feature frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants