I have heard people say that stuff about teaching being an aid to research but in my experience it is not true.
I was on a full time research appointment at harvard for 2 years, and it was the most productive period of ym life. The key is being around people who are stimulating and knowledgeable, and being able to talk to them.
We had research and learning seminars that were attended by workers from all over the state. You might call it teaching, but I was able to choose my own topic and give lectures from my own choice of sources, and the audience was extremely high level.
Mumford gave me his personal notes on theta functions, not yet published as the Tata lectures on Theta, and I lectured on them to a large audience. When I finished the elementary part, Freitag took over and pushed the level up to his current research.
All the while I was working on research problems of my own choice and talking to people about them. The flow of information to Harvard included updates on the most recent work of researchers throughout the world, and kept me far ahead of people elsewhere.
Profesors there including Fields medalists would explain their work to me, or ask me questions about fine points they failed to understand in the reserach of other specialists and I would happily research them for them and report back. Sometimes I discovered things this way that were presented at International conferences as new results over a year later.
There was never any lapse of activity or downtime. There were too many experts, too much to learn, to much to do. Teaching in comparison is like walking in plowed ground, trying t get one foot in front of the other, and longing for the time one will reach the other side.
I have also been to the IAS in Princeton, admittedly only on a vist, and compared to that time in Harvard, it was relatively unproductive. I.e. even the Institute was less stimulating to me eprsonally than the department at Harvard. Maybe the Institute is too isolated to be exciting. Maybe that isolated atmosphere where each person sits in his own office and thinks is what makes it potentially stifling.
My friends who have had semesters or years at the Institute however loved it. It is considered by many the ideal place to get a research program moving. Perhaps I am someone who functions better when able to talk to people rather than just sit and reflect.
And maybe teaching at Princeton or Harvard is a nice break from research because you get to teach something interesting, or teaching graduate subjects and research students, but teaching beginning courses for the 40th time, or even the third time, takes a real effort to make interesting again to oneself and to the class. Of course those of us who do it strive for that again and again. The summer break helps.
But the opinions expresed here are precisely backwards from my experience. I.e. research is much more necessary to good teaching than teaching is to good research. It is easy to do nothing but research and love it and do it well. Routine unrelated teaching does not help at all. But teaching really well without doing research is almost impossible. Research illuminates and motivates and enlivens teaching in an essential way.
I know people who love undergraduate teaching, and who have continued to love it and do it well for years, but some of them teach mainly honors and advanced courses, and primarily to majors. And they also keep in touch with research and advanced graduate teaching.
Those yeomen who teach the precalc and other staples of many programs over and over, without ever a break of graduate teaching or research time off, do a saintly service to school and students alike, with essentially no hope of ever resuscitating their research activities.