Not for the first time, some talented people attempt a spoof of Sherlock Holmes and come up with a debacle. Exactly forty years after the dreadful Peter Cook-Dudley Moore takeoff on “The Hound of the Baskervilles” comes “Holmes & Watson,” in which Will Ferrell and John C. Reilly, pairing up yet again, try desperately to extract a few laughs from a two-stooges parody of Arthur Conan Doyle’s creation. Despite colorful sets and costumes, it’s not a pretty sight to behold, with a witless script by Etan Cohen that loads down a dumb plot with an avalanche of lame jokes.

After a boarding school sequence in which the bullied young Holmes (Hector Bateman-Hardin) vows to suppress all emotion in favor of pure logic, the movie moves ahead to the adult version (Ferrell, barely attempting to maintain the boy’s British accent) blowing a court proceeding against Professor Moriarty (Ralph Fiennes, adding to his list of famous screen villains) before being summoned to the royal palace for a party that ends with an assignment to protect Queen Victoria (Pam Ferris) after she receives a death threat from somebody who ruins the occasion by delivering a cake with a corpse in it.

That leads to a succession of inane episodes, each coming across like a failed Saturday Night Live sketch. They’re all terrible (one features an extended throwing-up sequence typical of the picture’s level of sophistication)—though they do make room for anachronistic riffs on Donald Trump, like a goofy premonition about how American democracy could lead to bad electoral choices, a reference to a MAGA hat and a throwaway line about fake news. The desperation even descends to a musical duet for Ferrrell and Reilly intended, one supposes, as a takeoff on bad Broadway. Tastelessness is on regular display, of course, not least in the final reel’s succession of morbid jokes about the Titanic.

Ferrell mugs his way through the picture as a boobish but arrogant Holmes, while Reilly marks time as his endlessly supportive, stuttering sidekick. Much of the supporting cast is utterly wasted, including Fiennes, Hugh Laurie as Holmes’s brother Mycroft, Rob Brydon as an incredulous Inspector Lestrade, and Steve Coogan as a one-armed tattoo artist. The women fare somewhat better: Rebecca Hall is engagingly forthright as American doctor Grace Hart (whose presence invites lots of jokes about U.S. “progressivism” regarding women) and Kelly Macdonald makes Mrs. Hudson not only a younger but more shrewish figure than the norm. Best of all is Lauren Lapkus as Hart’s ostensibly mentally deficient patient Millie, who acts as romantic interest for the truly stupid Holmes (while Hart catches the eye of Watson, though the doctor also has a yen for Victoria—a crude running gag).

“Holmes & Watson” looks good enough—James Habridge’s production design and Beatrix Aruna Pasztor’s costumes are hardly realistic, but they’re at least eye-catching, and Oliver Wood’s cinematography is fine. So is Mark Mothersbaugh’s score. (The visual effects, on the other hand, are cheesy.) One has to congratulate Dean Zimmerman and J. Erik Jessen for editing the movie to under ninety minutes, even though they can do nothing to ameliorate the dragged-out quality of many scenes, a defect attributable to Cohen’s flaccid pacing and Ferrell’s propensity to milk material for all it’s worth even when that amounts to very little.

In the season that purportedly invites being jolly, “Holmes & Watson” unhappily just adds to Will Ferrell’s résumé of very bad comedies. The movie, which might have been titled “Sherlock Holmes: The Dumb and Dumber Version,” is this year’s Christmas turkey.