Photo: Photo: Andrew Cooper/Sony Pictures/© 2018 CTMG, Inc. All Rights Reserved.

Quentin Tarantino’s Once Upon a Time in … Hollywood, which premiered Tuesday to an absurdly packed, enormously appreciative Cannes crowd, is its own fetish object. A sprawling, dreamy re-creation of a moment in time when both Hollywood and America were changing irrevocably, the film finds Tarantino evoking — even more so than usual — the different textures and vernaculars of his obsessions: classic and not-so-classic TV shows, dead-end Westerns and cop dramas, fast-talking showbiz backroom blather, the assorted psychedelia of the 1960s. It’s the most fun the director seems to have had in years, but it’s also, oddly, his most compassionate picture in more than a decade. There’s a lilting sadness at the film’s heart, perfectly encapsulated by the way it intercuts between the world of a leading man whose time has passed and a happening starlet for whom everything feels fresh and new. It’s terrific … until it isn’t, which I’ll get to below.

The starlet, of course, is Sharon Tate (played with sunny sincerity by Margot Robbie), the 26-year-old actress who in 1969 was slaughtered, along with four others and her unborn child, by demented young followers of Charles Manson. The actor is Rick Dalton (Leonardo DiCaprio), a former TV Western star who now mostly does guest appearances as villains and forlornly spends his time with his stunt double, driver, and only friend, Cliff Booth (Brad Pitt). When Rick finds out Tate and her hotshot director husband Roman Polanski have moved in next door to his Cielo Drive home, he’s positively giddy, because he knows he might be able to snag a part in Polanski’s next film if he can become friends with them; it’s a potential lifeline to continued employment in a changing Hollywood taken with youth and newness. Sharon Tate is clearly the future, while Rick is desperate to stop being the past.

As for the slightly grizzled macho man Cliff, he’s an easygoing tough guy who has devoted his life to Rick and spends more time at his famous pal’s home than he does in his own cluttered, greasy trailer, where he lives with his loyal pit bull, Randy. Through Cliff’s various drives around town, Tarantino soaks up the atmosphere of a magical Los Angeles slowly going to seed, the movie mecca of exotic theaters and buzzing pool parties and glittering hot spots being invaded by the wild grass of youth culture and drugs. It’s a decadent town slowly, sweetly rotting away. (Although, in Cliff and Rick’s touching friendship, I also sensed a bit of the shit-kicking bonhomie of Burt Reynolds and his stunt double, Hal Needham, who in the mid-’70s would return a new form of languid machismo to the screen.)

As usual, Spaghetti Westerns serve as a touchstone for Tarantino, and here he repurposes Sergio Leone’s nostalgia-soaked signature image from Once Upon a Time in the West — a crane shot soaring over a rooftop to reveal the lost world of a bustling Western town — to mythologize spaces such as drive-in theaters and glittering Hollywood homes. The loving re-creation of this milieu is typically rich in detail, but there’s something else, too: a sense of twilight longing that wasn’t so pronounced before. Tarantino burst onto the scene in the 1990s like a DJ-prophet of the cultural trash heap, reclaiming lost films and shows and songs, but also attitudes and speech patterns and even fashion choices, presenting them back to us in a way that made them irresistible, prompting an entire generation to start emulating his obsessions. But for all that, his universe has always been a dark, twisted, cruel one. Here, more than in any other film Tarantino has made, we sense that we’re watching a world that he might want to live in. When the movie wanders and lingers, we sense that he’s the one who’s wandering and lingering. It’s not really a hang-out flick; the characters are too disconnected for that. Instead, the director is the one hanging out. He doesn’t want to leave this universe. He probably has an eight-hour cut of this thing somewhere.

That drifting, elegiac quality (which at times may recall his once-neglected, now-classic Jackie Brown) is the film’s great strength. There are several major set pieces — some hilarious, some creepy, one absurdly violent — that will get people talking, but perhaps the most powerful is a lengthy, seemingly aimless one that comes smack-dab in the middle. In it, we see Sharon in a half-empty matinee, watching herself in the action comedy The Wrecking Crew, her eyes lighting up every time somebody in the audience chuckles at one of her bits. Meanwhile, somewhere across town, Rick struggles to remember his lines and not break down while shooting a throwaway Western in which he plays a snarling villain. Tarantino films the fake Western with the high style common to classics of the genre — ominous tracks into close-ups, spittle-flecked stare-downs, shadowy figures — but he also films the making of the Western the same way, as well as the unmaking of Rick himself, as the actor is slowly pulled toward a moody showdown with his own growing irrelevancy. It’s silly, and overbaked, and beautiful, and I’m pretty sure it’s the first time I cried at a Tarantino movie in well over a decade. He and his actors lend the two characters’ respective moments — one rising, the other falling — just the right blend of mockery and pathos. These people are ridiculous, and we love them.

If Tarantino makes any missteps, they come at the end. I won’t reveal the ending, but if you want to remain totally fresh you may not want to read beyond this point. Tarantino sets it all up and stages the film’s climax quite well. But it still feels like the wrong ending for this movie, a somewhat ill-conceived attempt to reconcile Old Hollywood with the New. At the same time, I can see why he does it the way he does. Not just because he wants to shock us — though it’s actually not a particularly unpredictable finale — but also because his affection for this dying world is so powerful that he’s just not ready to let it go.