History log of /frameworks/opt/photoviewer/src/com/android/ex/photo/util/InputStreamBuffer.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8438174ae5d7568f6145a40e160f6fe7d7ebfc4d 01-Oct-2013 Matt Keoshkerian <mattak@google.com> Put debug logging behind a Log.isLoggable call.

This was causing too much spam in the Babel logs. Fix for bug 11015921

Change-Id: Ica0cbe37e5a49bf1a273292986b36495e78169d8
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/InputStreamBuffer.java
c631b5a4b1f19f84a70b772bc879fae7c92fd4a8 13-Aug-2013 Mark Wei <markwei@google.com> Decode EXIF data from input streams.

Create new wrapper class that allows us to treat an input stream as a byte[].
We buffer the minimum number of bytes necessary to avoid unnecessary allocations
which lead to GCs.

For a 1MB image, we get:
Much less memory: 16 bytes instead of 1,048,576 bytes.
Faster, less bytes read: 76 bytes for part of the header instead of 1,048,576
bytes.
Much less GCs: 0 GCs, compared to multiple 30ms GC for allocs in my testing.

Bug: 10036191
Change-Id: Ie8b4546f157a6870b6735a36a38889fe34862c83
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/InputStreamBuffer.java