There are some interesting bugs in the inventory handling that suggest a suboptimal implementation.
Clicking on an item doesn’t use that item, it uses the first item of that type in the inventory list. That changes the positions of inventory items before the cursor, which throws people off when clicking several items.
And if you have a huge number of herbs, clicking a cauldron takes a long time.
Based on that, I’m guessing that you search for items from the beginning every time, making the cauldron at least O(n^2).
Clicking an item should remove that specific item, and shift the remaining items up by one. And the cauldron should walk the list, remove all items of a type in one pass, and then add that many of the new item.