Re:How Discord Resizes 150M Images Every Day with Go and C++
by Xeoncross on Tuesday November 14, 2017 @12:40PM
(#15697275)
So why the image can't first be resized/compressed before being sent through your infrastructure...?
[ Parent
| on HN ]
Re:How Discord Resizes 150M Images Every Day with Go and C++
by b1naryth1ef on Tuesday November 14, 2017 @12:43PM
(#15697301)
Ah sorry I misunderstood you. We keep the original image around and provide different sizes for different platforms/resolutions/dpis/etc.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by radicalbyte on Tuesday November 14, 2017 @01:27PM
(#15697758)
You should seriously consider doing this for your mobile client; the worst thing about Discord is that it eats mobile data if you're uploading lots of images.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by tzahola on Tuesday November 14, 2017 @03:47PM
(#15698947)
That’s exactly the reason why the iOS Mail app asks you whether you want to attach an image in small/medium/large/original size.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by ehsankia on Tuesday November 14, 2017 @10:19PM
(#15701216)
Data aside, my phone takes pictures at ridiculously high resolutions. Whenever I go to send pictures with discord, it takes a good 30 seconds and half the time it'll just break.
As an aside, I wish the "share" button would share a lower resolution image instead. I don't mind storing the full quality picture, but handling a 10mb image is seriously silly.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by rockostrich on Wednesday November 15, 2017 @10:17AM
(#15704314)
The other side of this is if you're on mobile data and they decide to resize the images on the client then people will complain about the app eating up battery life because it's using so much CPU to resize the images. Plus, they won't have the full size image to share with people you may be chatting with on desktop. If you want to not use so much data while uploading images then you should probably resize them yourself or just not upload images unless you're on wifi.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by mark-r on Tuesday November 14, 2017 @01:01PM
(#15697487)
There's no reason this couldn't be a two-step process, resizing to something reasonable on the client then fine-tuning it on the server. I'm presuming you don't see the need to start with multi-megapixel images.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by wastedhours on Tuesday November 14, 2017 @01:21PM
(#15697691)
> I'm presuming you don't see the need to start with multi-megapixel images.
Might be a fair presumption today, but might not be for the future with hiDPI screens, VR etc... for the relative storage costs, it'd be better to have the original, and then you can programmatically run from there.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by mark-r on Tuesday November 14, 2017 @01:33PM
(#15697812)
Today's hiDPI screens can already display more detail than your eye can perceive. The issue wasn't about storage costs, it was about transmission costs which still matter for the foreseeable future.
Re:How Discord Resizes 150M Images Every Day with Go and C++
by dboreham on Tuesday November 14, 2017 @05:07PM
(#15699653)
Perhaps, but I think you can compress current-day phone images considerably without losing any actual image fidelity (because the sensor pitch significantly exceeds the lens resolution, and .. noise).