 The Secret  was written in roughly 26 hours and was the fastest episode written for the series at the time . The title for the episode is purposely vague and refer to Jim 's hidden feelings for Pam , Dwight and Angela 's relationship , and Oscar 's homosexuality . The shots at the Hooters restaurant was filmed relatively early in the day , and a majority of the scenes was improvised by Carell . " The Secret " received largely positive reviews from television critics and was watched by 8 @.@ 7 million viewers , ranking as the forty @-@ fourth most @-@ watched television episode of the week .