FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   do print/println slow down applets?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: do print/println slow down applets?  (Read 311 times)
Euskadi


do print/println slow down applets?
« on: Aug 1st, 2004, 6:16am »

i thought the subject might stand on its own.
 
do print and println slow down things in an applet if I compile something and put online?
 
I ask for the obvious reason -- it sure slows down things when i'm in the IDE -- and also to know if I need to comment out all my debugging stuff before i upload.
 
so anyway. a lot of text for a yes/no question.
 
yes/no??
 
Thanks.
 
mattgilbert

tangramkid WWW Email
Re: do print/println slow down applets?
« Reply #1 on: Aug 1st, 2004, 10:08am »

that is an interresting question. have you tried it out and noticed it slow down at all?
 
i don't know myself.
 
matt
 
 
 
fjen

WWW
Re: do print/println slow down applets?
« Reply #2 on: Aug 1st, 2004, 12:05pm »

i tested (on os-x) doing a println for every pixel of a 100x100 applet in every loop and then it's a yes (makes sense). this example sure is not a real-life-one but it shows there is a slow-down ...
 
i suggest to have a global boolean DEBUG and just put  
if (DEBUG) {}
around your print / prinln .. then you just have to set DEBUG = false and no print is done.
 
the question remains wether the if-test is slowing the applet down ...
 
fry


WWW
Re: do print/println slow down applets?
« Reply #3 on: Aug 1st, 2004, 6:20pm »

the if() test should be negligible, but the println() will almost certainly slow things down (and some might find it pretty sloppy). the suggested "if (DEBUG)" method is definitely the way to go.
 
Euskadi


Re: do print/println slow down applets?
« Reply #4 on: Aug 2nd, 2004, 5:08am »

Thanks!
 
There goes my externally placed excuse for speed in the app... the rest is all my fault.
 
Pages: 1 

« Previous topic | Next topic »