News for hackers. Stuff that matters.
Re:Improving Dropbox Performance: Retrieving Thumbnails by herf on Monday January 27, 2014 @02:59PM (#7132767)
Mostly you shouldn't have to hide backend latency by reordering, and if you don't reorder, you can just use JPEG image strips/sprites, which don't need double compression. JPEGs also stream, but in an order determined by the client, not the server.

In my experience, Dropbox is quite a bit slower (by 10-20x) than services optimized for serving images - using 1500ms to deliver a 25k file is very slow on the web, but it is very common when requesting files via the Dropbox web API. (I can only speculate about the reasons, but Amazon's s3 has big latencies too.)

Re:Improving Dropbox Performance: Retrieving Thumbnails by ziga on Monday January 27, 2014 @03:37PM (#7133035)
We thought of spriting the thumbnails on the server, but this introduces a few problems:

- All thumbs would have to be available on the server before the sprite can be encoded, which defeats progressive rendering. (Progressively encoding JPEG might be a possibility, but this isn't something we explored.)

- The additional cost of encoding/decoding a large image on the server/client.

-- Ziga (author)

Re:Improving Dropbox Performance: Retrieving Thumbnails by herf on Monday January 27, 2014 @04:11PM (#7133254)
Yes, you can stream JPEG pretty easily as long as you know the output size.

Also to combine JPEGs into a sprite, you can avoid all DCT/iDCT/color operations and use only the Huffman portion of the codec (decode, concat, encode). Since Huffman throughput is a considerable multiple of gzip (~10x?), I think you'd be quite a ways ahead, for memory and time.

Re:Improving Dropbox Performance: Retrieving Thumbnails by WhitneyLand on Tuesday January 28, 2014 @10:55AM (#7137762)
1) Not necessarily, you may not even need progressive rendering if sprite batches bring it down to a manageable number of concurrent requests, right?

2) How is it any more work to encode? It's the same total number of pixels and the memory footprint isn't that large for server or client.

I don't mean to dis your efforts, looks like you've done some nice work that performs well.

I just think cloud/media management is an interesting problem with a lot of different ways to look at it.

Re:Improving Dropbox Performance: Retrieving Thumbnails by erikpukinskis on Monday January 27, 2014 @05:23PM (#7133758)
I don't really use Dropbox, but I was randomly browsing through mine looking for a photo the other day and it was a "holy shit" moment. It's really fast to scroll through a huge number of photos. I had been scrolling through Flickr a few minutes before and it was a massive difference. Flickr was very much a scroll-and-wait experience.
Re:Improving Dropbox Performance: Retrieving Thumbnails by rhizome on Monday January 27, 2014 @08:20PM (#7134664)
For me, Flickr is basically unusable. Slideshows are impossibly slow, information is positioned outside the browser viewport, and simply bringing up an image-page is reminder of dialup. I can only blame inertial lockin for their usage numbers.
Re:Improving Dropbox Performance: Retrieving Thumbnails by drcross on Monday January 27, 2014 @04:24PM (#7133345)
On the functionality end of things I think dropbox should be stop new feature development until heavy UX is done with large unbiased test groups. The application is simple and it works pretty well but recently I've noticed different barriers to use, notifications that I'd prefer not to see just getting in the way. It's a result of Zawinski's law, it's happening to gmail where they think adding more bells and whistles is needed but it's not, in many case user experience declines, for example playing a youtube clip now blacks out the rest of your gmail page while you watch it. Application developers need to learn that less is more.
Re:Improving Dropbox Performance: Retrieving Thumbnails by dropboxer on Monday January 27, 2014 @08:22PM (#7134676)
hi there, I work at dropbox and am curious to learn more. what things did you run into that were unexpected and retracted from the UX? hopefully we can make it better!
Re:Improving Dropbox Performance: Retrieving Thumbnails by cstuder on Monday January 27, 2014 @02:56PM (#7132738)
What about a sprites-like system?

Since you pretty much know which pictures the user will request, just glue the next 100 thumbnails together into one big picture and then take it apart again on the device.

Re:Improving Dropbox Performance: Retrieving Thumbnails by elwell on Monday January 27, 2014 @04:50PM (#7133518)
Re:Improving Dropbox Performance: Retrieving Thumbnails by b0b0b0b on Monday January 27, 2014 @08:30PM (#7134696)
Were you already serving thumbnails over https? Or were they served over http?

edit: I was also wondering whether you can skip downloading some thumbnails based on the velocity of the scroll.

Re:Improving Dropbox Performance: Retrieving Thumbnails by ziga on Tuesday January 28, 2014 @03:27AM (#7136024)
We were already serving over https (we've implemented HSTS some time ago).

And good observation about scrolling -- we do in fact queue, prioritize, and skip thumbnails based on scrolling.

Re:Improving Dropbox Performance: Retrieving Thumbnails by zaptheimpaler on Monday January 27, 2014 @03:30PM (#7132988)
Basically, they chunk thumbnails - client asks for the next 10 thumbnails in one request, server sends back 10 thumbnails in the response.
Re:Improving Dropbox Performance: Retrieving Thumbnails by zoren on Monday January 27, 2014 @02:55PM (#7132730)
Base64 and then gzip just to make it easier on javascript? Seems hard on dropbox servers.

Why not use a multipart binary response?

Re:Improving Dropbox Performance: Retrieving Thumbnails by acdha on Monday January 27, 2014 @03:24PM (#7132954)
gzip is basically free on modern server hardware – if it makes life easier on mobile devices, this is a pretty easy tradeoff.
Re:Improving Dropbox Performance: Retrieving Thumbnails by WhitneyLand on Monday January 27, 2014 @02:40PM (#7132620)
I think they could still do better without using SPDY. Going to try and make time to test a different approach.
Re:Improving Dropbox Performance: Retrieving Thumbnails by cmicali on Monday January 27, 2014 @02:29PM (#7132529)
tldr: use SPDY, but until more universal support a similar custom hack is proposed

Neat hack though.. frustrating how much perf is lost due to HTTP sometimes

Re:Improving Dropbox Performance: Retrieving Thumbnails by tinganho on Monday January 27, 2014 @04:42PM (#7133455)
I just see one problem with this solution. You can't create Retina images out of base64 strings on any web browsers today.
Re:Improving Dropbox Performance: Retrieving Thumbnails by madeofpalk on Monday January 27, 2014 @05:35PM (#7133849)
> You can't create Retina images out of base64 strings

Why not? There's no such thing as a 'retina image', they're just a larger resolution. There's nothing stopping you from requesting a @2x set of thumbnails

Re:Improving Dropbox Performance: Retrieving Thumbnails by simonw on Monday January 27, 2014 @07:09PM (#7134312)
Are you sure you can't just serve up a 400x400px base64 image and put it in an image element with a height and width of 200?