fix performance issue with trim and fanouts
Merge remote-tracking branch 'origin/cassandra' into cassandra