A few optimizations for teaspoon related to memory exhaustion