Why is Mathematica limiting the execution time of my calculation? [duplicate]

Is there a Front End option (or programming option) in Mathematica 9 that limits the amount of time that functions take to execute? I have a function (as part of a Mathematica Application) that shows page breaks and iterates though each cell of a notebook. The function operated on large notebooks without problem in Mathematica 8, however in Mathematica 9, it reaches a different point of the notebook each time (and almost gets to the end if page breaks are already showing). The function operates without problem on each half of the notebook (and on smaller notebooks). I have not used any TimeConstraint options. Also note, that I am able to execute the function using Workbench (with Mathematica 9).

Have you tried adjusting $HistoryLength? – Verbeia Feb 12 '13 at 7:43 A bit more information on what your function actually does and how it is implemented would be very useful. – Yves Klett Feb 12 '13 at 9:57 @Verbeia, Thanks for pointing out$HistoryLength. I did not know of that setting. It was set at Infinity, however changing it to zero did not help –  MLD Feb 12 '13 at 23:56
The fact that it's in a button is the entire question. None of your code matters. The question could be boiled down to "Why does Button["wait", Pause[20]; Print["done"]] not complete"? The answer to which is that you should add the option Method->"Queued" as an option to the Button. –  John Fultz Feb 13 '13 at 2:29