GetImageFap

Reading a 337-picture gallery in fifteen requests

The obvious way is slow

A gallery page lists picture links but not picture addresses, so the naive approach opens each photo page in turn to read the address from it. On a 337-picture gallery that is 337 page loads at roughly 1.2 seconds each — about seven minutes of waiting before a single byte of picture has moved.

Two lanes on one clock. The naive lane fills 337 tick marks and reaches 6 minutes 44 seconds. The block lane fills 15 blocks and stops at 2.6 seconds and 240 kilobytes, with the block offset stepping by 24.
Both lanes run on the same clock. The block lane has finished before the naive lane has opened its third page. Scroll the panel sideways to read it all.

The gallery hands out blocks of 24

ImageFap's own interface does not work that way. Its photo view fetches its filmstrip in blocks, and that partial response carries the full-size address for all 24 pictures in the block, each with its own signature. Step the block offset by 24 and the blocks come back cleanly, with no overlap.

Fifteen requests, in parallel

337 divided by 24 is fifteen blocks. Requested six at a time, the whole gallery resolves in 2.6 seconds against about 240 KB of traffic — a twenty-second of the work, and gentle enough on ImageFap that nothing throttles.

Then the browser takes over

From there the server is finished. It returns a list of addresses, and your browser fetches roughly 400 MB of pictures directly from ImageFap and zips them locally. The heavy part of the job never touches our infrastructure, which is the only reason the tool can stay free and uncapped.

Guides