5 ms·
In short: They first used JSON, if I understood correctly. Then "In last six months, we have transitioned most of Facebook on Android to use FlatBuffers as the
by acqq 11y ago
In short: They first used JSON, if I understood correctly. Then
"In last six months, we have transitioned most of Facebook on Android to use FlatBuffers as the storage format. Some performance improvement numbers include:
Story load time from disk cache is reduced from 35 ms to 4 ms per story.
Transient memory allocations are reduced by 75 percent.
Cold start time is improved by 10-15 percent.
We have reduced storage size by 15 percent."
- ncr100 11y agoThey didn't need to mutate the JSON hierarchy. That's the big observation, the take-away. So they took advantage of that fact by not inflating ("flattening") the data structure using a stream.
- chmike 11y agoThis is indeed a very interesting encoding. One part of the optimization comes from the use of binary encoding and the other from using offset tables to optimize random access. Offset tables also allows to modify random data in the structure without having to reencode the whole information. This comes at the price of less compact data. It looks like I could update my YABE encoding which is a straight JSON binary encoding.