←back to thread

1901 points l2silver | 1 comments | | HN request time: 0.422s | source

Maybe you've created your own AR program for wearables that shows the definition of a word when you highlight it IRL, or you've built a personal calendar app for your family to display on a monitor in the kitchen. Whatever it is, I'd love to hear it.
1. arielweisberg ◴[] No.35743133[source]
Maybe not interesting, but a slideshow application that is much faster and more memory efficient than anything I could find.

Image viewers I tried all beachballed constantly, were slow to respond if they even did, had many bugs, and required many interactions and pixel hunting to interact with.

It emphasizes instant response even when working with 10s if thousands of very large photos, and a UI that eliminates or reduces required interactions, and integrates with finder smartly.

It defaults to opening folders or images fullscreen and round robins windows across displays. The UI is a 3x3 button grid overlay that auto hides, the window name is the the last three parts of the file path. There is gesture support, but I don’t use it because focus is a pain to deal with.

JPEG decoding is memory intensive so there is a shared rendering process so the parallelism can be managed and memory uses isn’t duplicated.

A shared cache process contains bitmaps of images scaled to screen size that are stored on disk. This kind of assumes you are on a fast flash drive like an MBP where flash is basically as fast as memory.

The cache is a 100 element LRU in front of Caffeine (W-Tiny LFU) and all the cache state is persistent including Caffeine so it can remember the LRU and adaptive cache state across restarts.

Prefetching scales the previous and next five images in parallel so you can click forward/next and it is instant every time.

When you turn shuffle off it plays forward from the image you were on. You can click a button and it will loop all files on a directory.

You can open multiple files or directories from finder and it will play all nested files in order.

The order is a natural order that parses numbers so if the numbers aren’t padded you still get the correct order.

Ended up using JavaFX which works surprisingly well. Fast JPEG decoding, working HiDPI, window resizing and movement renders very nicely.