Preheat oven to 300F (150C). In a medium bowl, using an electric mixer or wooden spoon, beat butter until creamy. Gradually beat in sugar and vanilla. Continue beating until well mixed, about 2 min. In a small bowl, using a fork, stir salt into flour until mixed. Stir 1 tbsp (15 mL) chopped fresh rosemary or 1 tsp (5 mL) crumbled dried rosemary and 1/2 tsp (2 mL) hot red-chili flakes (optional) into flour along with salt. Using a wooden spoon, beat into the butter mixture just until combined.
Divide into 2 portions. Place each in a 9-in. (23-cm) buttered pie plate. Press evenly into dishes. Sprinkle edges with 2 tsp (10 mL) chopped fresh rosemary (optional). Don’t use dried rosemary for this garnish. Bake 45 to 55 min. Slice each disc into 12 wedges while still warm.