I was just wondering what are the factors that determine script size in AviSynth. I'm making a slide show and I'm using about 18,000 lines of "DuplicateFrame" generated by a little C++ program I wrote. Yes, it's a bit ludicrous.

When I load my HUGE script I get an error that AviSynth had a stack overflow -- I guess I shouldn't surprised. I then reduced my script to about 4500 lines and it worked. Granted, I could just render my video into small pieces and join the pieces, though that would be LOTS of GBs of video. Maybe I'm pushing AviSynth's limits too far with such a large script? Suggestions? Flames?