speed up activity tree implementation