aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/AndroidDataSerializer.java
Commit message (Collapse)AuthorAge
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195100125
* Automated rollback of commit f672a31b8b19baab95373e4f2f6d110aa8b8f0fb.Gravatar corysmith2018-02-16
| | | | | | | | | | | | | *** Reason for rollback *** Unclassified general breakages in tests. Rolling back for further investigation. *** Original change description *** Normalized the serialization proto to save space and allow greater versatility in storage. RELNOTES: None PiperOrigin-RevId: 186057879
* Normalized the serialization proto to save space and allow greater ↵Gravatar corysmith2018-02-16
| | | | | | | versatility in storage. RELNOTES: None PiperOrigin-RevId: 186036607
* Remove unused DataKey attribute.Gravatar corysmith2018-02-15
| | | | | RELNOTES: None PiperOrigin-RevId: 185847904
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Split AndroidDataDeserializer out of AndroidDataSerializer, as the two classesGravatar Googler2017-03-14
| | | | | | | | do different (if similar) things and had no common code whatsoever. -- PiperOrigin-RevId: 149942714 MOS_MIGRATED_REVID=149942714
* Wrap the source Path in a DataSource object.Gravatar Googler2016-10-25
| | | | | | | | The DataSource object will then be used to track which values have been overwritten and avoid incorrect merge warnings. -- MOS_MIGRATED_REVID=137159260
* Share source paths for more compact res proto serializationGravatar Googler2016-08-17
| | | | | | | | | | | | | | | | | | | | | | | Source abs paths can be pretty long. If a value file like colors.xml has N resources then we serialize the path N times. Instead, make a table and just serialize the index. Can reduce resource proto sizes from X to 0.65*X. in some experiments. CPU instructions executed is slightly lower, but critical path impact is pretty minimal since parsing happens in parallel anyway. This doesn't help with drawables (path only shows up once) but doesn't really hurt (an extra index number). I tried sharing the root (a table of the res dirs). That can be another 10%, and helps with the drawable case. However, a naive enumeration of roots (src.getParent().getParent()) added *much* more overhead to the writing stage, so I didn't go on with that. -- MOS_MIGRATED_REVID=130440810
* Improve resource DataKey serialization perf a bitGravatar Googler2016-07-27
| | | | | | | | | | | | | | | | Address the TODO about using toString in the TreeMap comparator by using DataKey#compareTo. Also, use the entrySet to iterate K-V pairs instead of calling get(key). Synthetic benchmark w/ 10000 random keys: Before: 260ms to serialize After: 33ms to serialize Less of a difference when there are few keys. -- MOS_MIGRATED_REVID=128469407
* Renaming nonOverwriting to combining resources.Gravatar Googler2016-05-10
| | | | | -- MOS_MIGRATED_REVID=121863653
* 4.99 of 5: Cleanup.Gravatar Googler2016-05-05
| | | | | | | Cleans up a few warts from the last few changes. -- MOS_MIGRATED_REVID=121588557
* 4.7 of 5: Remove serialization of transitive dependencies.Gravatar Googler2016-05-03
| | | | | | | Serializer no longer serializes transitive resources. That turned out to be a performance issue with large trees. Instead,it relies on the build tool to indicate the direct and transitive resources. This reduces the number of keys that get pulled from diamond dependencies and stays much, much leaner. -- MOS_MIGRATED_REVID=121382705
* 4 of 5: Serialization of UnwrittenMergedAndroidData.Gravatar Googler2016-04-20
Adding AndroidDataSerializer, the serialize_format proto, and KeyValueConsumers (utility class for keeping consumers straight). The serializtion is a bit more manual as previous experience has proven to me that simply writing all the resources into a proto map and pulling them out is not performant in the least. So, the serializer stores each message independent, the keys and then the values allowing for potential lazy loading and other optimizations in the future. Also adds tests for parsing and writing style resources. -- MOS_MIGRATED_REVID=120274904