Profile cover photo
Profile photo
Dianne Hackborn
29,964 followers -
Google (Android Framework)
Google (Android Framework)

29,964 followers
About
Dianne's posts

Post has attachment
OMG I love this band!

Post has attachment
Really, Giuliani?

“Don’t you think a man who has this kind of economic genius is a lot better for the United States than a woman, and the only thing she’s ever produced is a lot of work for the FBI checking out her emails?”

https://www.yahoo.com/news/trump-nytimes-taxes-18-publish-legal-161316688.html

Post has attachment
Yay, pineapple guava season has started! First ones on the ground, ready to eat. :)
Photo

Post has shared content
Very good video on optimizing apk size. One thing worth mentioning that I have started to see as an anti-pattern is compressing the resource table in the apk. Don't do that! :)

When aapt generates the resource table file in your apk it always stores it uncompressed, and this is very deliberate: on the device the system can then just directly mmap that file from the apk; however, if that file has been compressed then, each time the resources are loaded, they need to be decompressed in to a local RAM allocation for the entire size of the file. Using mmap is significantly more efficient, since it only needs to load in to RAM the parts of the resource table that are actually used (think about all the different languages you may have, for example, when only one of them is going to be used), can share this mapping across all processes using the file, and the system can even page out parts of the file it doesn't currently need.

Compressing the resource table also helps other things much less than you may think. For example, when the play store is delivering an apk to a device, it is also compressing the entire apk that it transferred -- so you still get the full benefit of compression when considering the network traffic needed. In fact, an uncompressed resource table may be even better when delivering updates to the apk, since the play store will better be able to generate a delta update between the old and new resource table.

So the only place a compressed resource table really helps is in at-rest storage on disk. But this comes at a significant cost of much more RAM used at runtime, and this cost can hit you all over the place: if you have multiple processes, each process will need to load its own copy, and other application processes (such as the launcher or share dialog or notification UI) will need to decompress into its own RAM the entire resource table whenever it needs to load resources from your application. Ouch!

Let the system mmap that file. :)

Post has attachment
Have a look at this Kickstarter being done by a friend of mine, who I have worked with on and off over many years and is a pretty awesome engineer. It looks like they are doing some pretty cool things, if you are in to this kind of game.

Post has attachment
Best boss battle music ever?

Post has shared content
I will be participating in this!
Upcoming AMA with Android engineering team, July 19 @12pm PT * /r/androiddev

The Android engineering team will participate in its first ever AMA on /r/androiddev this Tuesday, July 19 from 12-2pm PT.

This will be your chance to ask us any and every technical question related to the development of the Android platform -- from the APIs and SDK to specific features. Please note that we want to keep the conversation focused strictly on the engineering of the platform.

https://goo.gl/8bRZKN

Post has attachment
I love this video.

I very much enjoyed the new Ghostbusters. I didn't find the basic story as interesting as the original one (which I think is both for the better and worse), but it was pretty continually entertaining with a lot of great jokes.

This is also the first time I have gone out to see a recent movie at an actual movie theater in I-don't-know-how-long, solely due to all the nasty negative stuff being said about it. So good job on that!

Post has attachment
Ah it's been a while since I listened to this stuff. So good!
Wait while more posts are being loaded