{"type":"rich","version":"1.0","author_name":"frederikhandberg (npub1nj…52gqz)","author_url":"https://nostr.ae/npub1nj0crmtetu84a7j43yegy358mp8u0e4ye7ndkhtd8dg0edll4mpqn52gqz","provider_name":"njump","provider_url":"https://nostr.ae","html":"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…"}
