Heat the oil
in a large (at least 4-quart) saucepan or Dutch oven
over medium-low heat. Add the garlic or onion. Cook, stirring often, until the garlic or onion is golden and softened, 5 to 10 minutes for garlic (don't let it burn); about 20 minutes for onion. Stir in the red chile flakes, let them heat for 15 seconds to release their flavor, and then pour in the tomatoes with their juices. Bring to a boil over medium high, stirring frequently, and then reduce the heat to maintain a simmer. Add the salt and basil and simmer, stirring occasionally, until the sauce is full-flavored and has reduced to a thick, saucy consistency, 20 to 40 minutes (some brands of tomatoes take longer to cook down). Pools of orange may appear on the surface, which means the sauce is done. Taste and add the pinch of sugar only if the sauce lacks the natural sweetness of perfectly ripe, fresh tomatoes.