When Joan Rivers got her own talk show in 1986, she phoned Johnny Carson, with whom she’d developed such a kinetic rapport during her many Tonight Show appearances that she became its permanent guest host. Johnny hung up on her and never spoke to her again. That, says her longtime manager Billy Sammeth in Joan Rivers: A Piece of Work, was the beginning of Rivers’ downward slide in confidence, employment, and domestic happiness, the latter especially eviscerating her when her husband committed suicide.

Chances are you regard Rivers as an obnoxious windbag, and if you don’t find a mom calling her daughter a “stupid fucking cunt” during a stand-up set riotous, well, this doc won’t change your mind. Sammeth knows, too, that presently people see his now-former client only as a “plastic-surgery freak.” But co-directors Ricki Stern and Anne Sundberg offer a different view. Yes, A Piece of Work is essentially a comedic Behind the Music, but this peek at what goes into a ridiculously long comedy career is at once sad, riveting, and inspiring. The opening shot is a close-up of Rivers’ face being made up, and as with her wrinkled and harshly uneven complexion, the then-75-year-old exposes her daily life. Most of the film is devoted to Rivers’ struggles to keep working. If her calendar isn’t stuffed, she isn’t happy. “I’ll show you fear,” Rivers says to the camera—-and then holds up a completely blank month.

Rivers hustles like a workaholic on speed, accepting even dates in the middle of the afternoon—-or Middle America—-in order to keep her name on the public’s mind as well as to continue her extravagant lifestyle. (Her New York home is gilded to the point of garishness, though she’s not egotistical about her luxuries: “Every time I get into a limo, I say, ‘Thank you, God.'”) She has a card-catalog filing system that is bursting with jokes sorted by topic. (“I prepare like a crazy person.”) When she’s not doing stand-up, Rivers works on an autobiographical one-woman show, which she road-tests in Scotland before trying to book it in New York, saying she wouldn’t be able to take negative reviews in her beloved hometown. (“In this business, you’re mud your whole life.”)

Although A Piece of Work brims with Rivers’ worries, it’s also pretty funny. The moments when she speaks from the heart or puts herself down without a joke are few, albeit all the more touching because of their rarity. It’s astonishing to watch this vibrant—-and, despite her many surgeries, attractive—-woman work on a few hours’ sleep and then see footage of her previous television appearances that go so far back they’re in black and white. Though don’t tell her she opened doors for female comics: “I’m still opening doors,” she says, frequently referencing Kathy Griffin—-sometimes negatively—-as both a peer and someone who wouldn’t have a career if it weren’t for her.

Indeed, Griffin still has competition there, as clips of Rivers’ stand-up proves. Her vulgarity is shocking yet hilarious, and even when she rips into a heckler for what seems like a ferocious eternity, she smoothly segues the tirade back to a joke. The film leaves you with the impression that Rivers would shove you in front of a bus in order to pick up a quarter. But she’d probably make you laugh as she’s doing it.