Optimization: Be able to limit amount of emitted segments