Context
PR #60 added the ImageViewerPane which loads images via FILE_READ_BINARY IPC (reads file as Buffer → base64 string → blob URL).
Issue
Base64 encoding increases the data size by ~33%, and the full image is held in memory twice (once as base64 string, once as the decoded blob). For large images (e.g., 20MB PNGs), this could cause noticeable memory pressure.
Suggested fix
Consider using Electron's file:// protocol directly for image src URLs instead of reading through IPC. This would avoid the base64 round-trip entirely and let Chromium handle the file loading natively. May need CSP adjustments.
From PR #60 review.
Context
PR #60 added the ImageViewerPane which loads images via
FILE_READ_BINARYIPC (reads file as Buffer → base64 string → blob URL).Issue
Base64 encoding increases the data size by ~33%, and the full image is held in memory twice (once as base64 string, once as the decoded blob). For large images (e.g., 20MB PNGs), this could cause noticeable memory pressure.
Suggested fix
Consider using Electron's
file://protocol directly for imagesrcURLs instead of reading through IPC. This would avoid the base64 round-trip entirely and let Chromium handle the file loading natively. May need CSP adjustments.From PR #60 review.