As you know, timing is everything when preparing a meal. The same holds true for spicing, that is, when you spice has an effect on the intensity of the flavor. Depending on the spice, cooking can increase potency, as you may have discovered when adding cayenne to your simmering spaghetti sauce. Or the flavor may not be as strong as you thought it would be. This is particularly apparent when adding herbs that are cooked over a long period of time, whether in a sauce or slow cooking in a crock pot.
Flavorings can be tricky when they come into contact with heat. Heat both enhances and destroys flavors, because heat allows essential oils to escape. The beauty of a crock pot is that slow cooking allows for the best results when using spices in a meal. The covered pot keeps moisture and steaming flavors and oils from escaping, and it allows the spices to permeate the foods in the pot. Using a microwave, on the other hand, may not allow for flavor release, especially in some herbs.
Common sense tells us that the baking spices, such as allspice, anise, cardamom, cinnamon, cloves, ginger, mace, nutmeg and mint can be added at the beginning of baking. All hold up for both short term and long term baking periods, whether for a batch of cookies or a sheet cake. They also work well in sauces that need to simmer, although nutmeg is often shaken over an item after it has been served. Cinnamon, as well as rosemary, will wreak havoc for those using yeast recipes and both are considered yeast inhibitors. Caraway seed has a tendency to turn bitter with prolonged cooking and turmeric can be bitter if burned.
Most herbs tend to be a little more delicate when it comes to cooking. Their flavors seem to cook out of a sauce much more quickly. Herbs include basil, chervil, chives, cilantro, coriander, dill (the seeds can handle cooking longer than the leaves), lemon grass, parsley (flat leaf or Italian is better for cooking), sage, tarragon and marjoram. In fact, marjoram is often sprinkled over a soup after serving and isn’t cooked at all.
The exception to these herbs is the hardy bay leaf, which holds up very well in a crock pot or stew. Oregano can be added at the beginning of cooking (if cooking less than an hour) and so can thyme. Often sustainability of an herb’s flavor has as much to do with the temperature at which it is being cooked, as with the length of cooking.
Onions and their relatives can handle prolonged simmering at low temperatures, but are better added toward the end of cooking. Leeks are the exception. Garlic may become bitter if overcooked. The milder shallot can hold up well, but will become bitter if browned.
Peppercorns and hot peppers are best added at the end, as they become more potent as they cook. This includes chili powder and Szechuan peppers. Here paprika is the exception and it can be added at the beginning of cooking. Mustard is often added at the end of cooking and is best if not brought to a boil.
Sometimes not cooking has an effect on flavor. Many of the herbs mentioned above are used in salads. Cold, uncooked foods such as potato salad or cucumbers can absorb flavor, so you can be more generous with your seasonings and add them early in the preparation. Freezing foods can destroy flavors outright, so you may have to re-spice after reheating.
Once again much of the cooking process depends on how long and how hot you cook your food. It also has a lot to do with how you like your food to taste. My Midwestern relatives can’t handle the hot peppers like we Southwesterners can, and I can’t use cayenne in their presence. As you can see, spicing is not objective, nor is it an exact science. But that shouldn’t prevent you from playing the mad scientist and delving into hands-on experimentation.