2 ms·
Normally to show thumbnails you need to parse the whole image anyway. Unless that is the format doesn't have downscaled data already (progressive jpeg/PNG)
by loa_in_ 6y ago
Normally to show thumbnails you need to parse the whole image anyway. Unless that is the format doesn't have downscaled data already (progressive jpeg/PNG)
- Someone 6y agoIf you don’t cache thumbnails, that’s true, but that’s too slow, so you cache thumbnails. If you do that, you only have to read the whole image the first time. Once you created the thumbnails, you only need to read them, and they’re a lot smaller, and can be put in a single file. The proposed approach reads a significant part of each file to determine whether the cached thumbnail is still current. That doesn’t give a huge improvement over not caching thumbnails at all (factor of 5 in bytes read/network traffic, as a rough guess, likely less in disk seeks)
- loa_in_ 6y agoYou're right. I got a bit ahead of myself it seems.
- lovelyviking 6y agoThank you for thoughts though. Was interesting to read both of you.
- lovelyviking 6y agoIt's a dilemma of memory vs computation. It depends on what we expect/prefer: FM that takes a lot of memory or FM that use computation resources when required only. I tend to think that in general expectation from FM is to be very small in memory demands and take valuable computational resources only if it is absolutely necessary.
- loa_in_ 6y agoMy approach would work amazingly in ipfs where hash of contents is an intrinsic property of the file system