RE: Exection time limit exceeded by agent Stan Rogers 25.Jun.12 06:01 AM a Web browser Domino Designer All ReleasesWindows 2003
There are a lot of things that can be done to significantly speed up code, quite apart from what you're describing here. Turning off AutoUpdate at the view level has already been mentioned, and you've already avoided the GetNthDocument pit that a lot of developers fall into. Quite a bit of what can be done depends on what you need to do at the document level, so without knowing what the agent is doing to the documents, we can only give a few high-level hints.
Read from ColumnValues whenever you can. Open only those documents that need to be opened; it's a relatively expensive process that you can often avoid.
Putting documents that are to have a common value written into a collection and calling StampAll is much quicker than writing individual field values.
When the decision tree and the actions to be carried out are relatively simple, using a Formula Language (or Simple Actions) agent and the agent's search property can be significantly faster than Lotusscript or Java. It's a lot less "programmer-y", but sometimes pride needs to take a back seat to performance.