Print() function -- slow performance

I had some performance issue running on a fullscreen mode recently. It dropped from 60 FPS to 2 FPS after 40 seconds. Searched many lua forums to optimise my code; no success. After awhile I realised it was a singular print() function I had forgotten to comment out that caused the problem. Just to let anyone know in case you have similar issue.

I noticed this as well, print is great for debuging, but if the print window get’s full and starts scrolling it kills performance.

Hi, this is not clearly mentioned but it is no longer an issue with the new sidebar implemented in 1.5
http://twolivesleft.com/Codea/Talk/discussion/98/codea-roadmap-next-version-1.5-current-1.4.6

I suggest using clearOutput() before your print (or calling it periodically) for now to prevent slowdowns.
Also, have a look at the watch function, it can be pretty helpful

look around here for a project called redirect(). It solves the problem of print’s speed by moving the data from the output window to a window on your drawing surface. Pretty cool project, I use it in my 3D and 2D projects.