A method of heating an item in a cavity of a cooking appliance including the steps of detecting the size of the item at a first time during a cooking cycle and detecting the size of the item at a second time during the cooking cycle. The cooking cycle is then controlled at least partially based on the size of the item at the second time during the cooking cycle. A cooking appliance for carrying out the method is also provided.