Optimize activity feature generator.