Merge "DO NOT MERGE: Don't do heavy operation while in the synchronized block" into tm-dev