Heat olive oil in a Dutch oven or soup pot over medium heat. Add the onions, and season with a little salt and pepper. Cook, stirring occasionally until onions are nicely browned, about 20 minutes. This step can not be hurried, the end result will be a rich golden brown mass of onion. This is where all your flavour comes from and can take a little practice. The darker you can get the onion without burning, the better the flavour.
Slowly pour the beef broth into the soup, stirring to remove any bits of onion that may be stuck to the bottom of the pan. Add the sprigs of parsley and thyme to the soup. Bring to a simmer, and cook for 20 minutes. Do not boil. Pour the sherry into the soup, and simmer for 5 more minutes. Taste and season with salt and pepper if desired. Remove the sprigs of parsley and thyme.
Preheat the oven's broiler. Place serving bowls onto a baking tray. Ladle the soup into serving bowls, and float a slice of bread on top of each one. Sprinkle shredded Gruyere cheese over the top. Broil for 2 minutes, or until browned. Serve immediately.