Frederik Handberg on Nostr: I have been working on improving the fullscreen search functionality by implementing ...
I have been working on improving the fullscreen search functionality by implementing a preview mode. So now, there are two modes: _Grid_ and _Preview_. The preview mode is simply the grid but with a preview of the file’s contents. There will also by a third mode called _List_.
I experienced some serious performance issues after implementing this new preview mode. This is really what most of my time was spent trying to fix.
Before I was showing a real representation of the canvas where I rendered all the objects and scaled them to an appropriate size. Doing a full render of a canvas that could potentially contain 20 different objects (images, videos, note documents, etc.) is a bad idea. And it becomes an even worse idea if the search results include more than one canvas.
I decided to figure out a different solution that would solve the performance issues.
So I started experimenting… I figured that I could actually just show an image of the canvas, so I implemented functionality to take a snapshot of the canvas whenever closing a canvas file or switching to a different tab.
This works really well and I think I will choose the same approach for the minimap inside canvas files. Because currently, I am doing a full render of the objects inside a minimap and there is just no reason to do that… Instead I will just use the snapshot approach.
This means, I should also save a snapshot after making a change in the canvas, but of course with a debounce timer. For example, if moving an object, then take a new snapshot after a timer has expired.
Will share a video demonstrating of the fullscreen search later…
Published at
2026-03-28 14:50:44 UTCEvent JSON
{
"id": "65b8ae3d121df6dc7e9d030999851b9fd44a47e6c00ec0832cbb657bad462cb3",
"pubkey": "9c9f81ed795f0f5efa558932824687d84fc7e6a4cfa6db5d6d3b50fcb7ffaec2",
"created_at": 1774709444,
"kind": 1,
"tags": [
[
"client",
"Nostur",
"31990:9be0be0fc079548233231614e4e1efc9f28b0db398011efeecf05fe570e5dd33:1685868693432"
]
],
"content": "I have been working on improving the fullscreen search functionality by implementing a preview mode. So now, there are two modes: _Grid_ and _Preview_. The preview mode is simply the grid but with a preview of the file’s contents. There will also by a third mode called _List_.\n\nI experienced some serious performance issues after implementing this new preview mode. This is really what most of my time was spent trying to fix.\n\nBefore I was showing a real representation of the canvas where I rendered all the objects and scaled them to an appropriate size. Doing a full render of a canvas that could potentially contain 20 different objects (images, videos, note documents, etc.) is a bad idea. And it becomes an even worse idea if the search results include more than one canvas.\n\nI decided to figure out a different solution that would solve the performance issues.\nSo I started experimenting… I figured that I could actually just show an image of the canvas, so I implemented functionality to take a snapshot of the canvas whenever closing a canvas file or switching to a different tab.\n\nThis works really well and I think I will choose the same approach for the minimap inside canvas files. Because currently, I am doing a full render of the objects inside a minimap and there is just no reason to do that… Instead I will just use the snapshot approach.\n\nThis means, I should also save a snapshot after making a change in the canvas, but of course with a debounce timer. For example, if moving an object, then take a new snapshot after a timer has expired.\n\n\nWill share a video demonstrating of the fullscreen search later…",
"sig": "ff4103e210d72b9286855c0e148f2abc3a494ec8be7e578b9f82f602c601271f3e9aa8b327c05700aead2892c317a42aaa0f504e25e68c370ee1cf39c484c7e8"
}