Facebook has made some changes in the background to its iPhone and iPad app that should allow users to load photos faster. The improvements are due to Facebook adopting the Progressive JPEG (PJPEG) image format.
The PJPEG format stores several scans of one photo, each with a different level of quality. This allows the image to be rendered with the first, low quality scan, and then be updated with the other scans that each have a higher level of quality. Facebook now users the PJPEG image format for several reasons:
- Data consumption: PJPEG allows us to skip downloading smaller versions of an image.
- Network connections: Since we don't download smaller versions of an image anymore, we now use only one connection per image instead of many.
- Disk storage: Storing fewer photos on disk decreases the amount of disk space used by the app.
- One URL: Since we no longer need to download multiple images at different sizes, we can simply use one URL.
The final result is that photos in the iOS Facebook app with the PJPEG format load 15% faster compared to its old method.