In a large saucepan, melt the butter in the oil. Add the onions and cook over high heat, stirring frequently, until just softened and beginning to brown, about 10 minutes. Reduce the heat to moderate and cook, stirring frequently, until the onions are golden and softened, about 20 minutes. Add the garlic and cook until fragrant, about 1 minute. Let cool, then coarsely chop the onions.