performance improvement in ddoc and trending filter