Facebook speeds-up Android software with ReDex
(Image Credit: iStockPhoto/mikkelwilliam)
Whilst millions of people call on Facebook to fix the battery drain their apps cause, the social networking giant can't be criticised for its obsession with efficiency. During its annual F8 developer conference, Facebook announced a tool called ReDex which can speed-up Android software with little extra work from the developer.
ReDex is employed internally to place the accelerator down on its own Android software, which has sped-up how quick the Facebook app opens by 15 percent and enabled the app to be 25 percent more responsive on modern smartphones. When compared to devices from 2011, the Facebook app now opens 25 percent faster.
Facebook's tool focuses on ensuring the Android bytecode – a layer of code between the software and the operating system – is optimised and running as fast as possible. In a blog post, Facebook explained why it chose to focus on the bytecode: "The advantage of doing our optimizations at the bytecode level (as opposed to, say, on the source code directly) is that it gives us the maximum ability to do global, interclass optimizations across the entire binary, rather than just doing local class-level optimizations."
"We opted to perform the transform on dex bytecodes rather than Java bytecodes because certain transforms can only be done post-DXing. This would be analogous to the post-linking stage in a C-style compilation process, where you can make global optimizations across your entire binary."
ReDex, as mentioned earlier, requires little extra work to gain significant efficiency benefits. After it has been added to your app, it will sort out the bytecode on-the-fly and even shrink the size of the application. "It transforms bytecode magically into better bytecode," said Facebook software engineer Bert Maher.
You can get started with ReDex for your Android software from today as it's been released under an open source license. Undoubtedly ReDex is prepared to join the ranks of Facebook's other popular development tools like React Native, but hopefully it won't depart the same way as Parse.
Get your ReDex fix on GitHub here.
Do you plan on using the ReDex optimisation tool? Let us know in the comments.
- » Project Treble is making a big difference to the speed of Android updates
- » GitHub announces native Android and iOS apps alongside new features
- » Google releases a new Android Automotive emulator for developers
- » We can work it out: How the Lennon-McCartney partnership can translate to software development
- » Google Cardboard goes open-source as VR SDK development halts