From: Florian J. <flo...@we...> - 2011-04-26 09:42:43
|
Am 25.04.2011 19:16, schrieb Robert Jonsson: > Hi Flo > > 2011/4/25 Florian Jung<flo...@we...>: > >> Hi >> >> my score editor produces a heavy lot of debugging output, which renders it >> really slow if not piped through grep or to /dev/null. however, that >> debugging output may become really useful in the unlikely case that someone >> finds a bug in the rendering code, so i don't want to remove it fully. >> >> what do you suggest to do with it? >> >> comment it out? (looks ugly. i don't like that) >> put a #ifdef VERBOSE_DEBUGGING around? >> put a if (verbose_debugging) around? (difference is: changeable at run-time >> vs. compile-time) >> replace all occurrences of "cout" with "my_debug_out", and insert some >> "my_debug_out = cout" line if i want to debug or a >> "my_debug_out.open("/dev/null")" if i don't want to debug? (i don't like >> this, because this still parses all the variables, only for writing stuff to >> /dev/null) >> >> i'd tend to either #ifdef or to if(verbose_debugging)... are there any >> muse-wide variables or defines which define the debugging-output-verbosity? >> also, it would rock if there was some "some debug output" and "really much >> debug output" option >> > Yeah, unless it's performance critical code, but I would not expect > there to be in the score (?), well, dunno what you mean with "performance critical"... enabling debugging output makes the score take one or two seconds for recalculating, which is done on every note insert, delete, modify etc operation. it really feels sluggish then. but disabling or redirecting it to /dev/null makes it really fast ;) > you can check for > if(debugMsg) > a global variable set with with -D > In some classes there are specific ifdefs for heavy debugging but I > would think the debugMsg variable is more convenient. > > okay, thanks i'll do this ;) > Regards, > Robert > > greetings flo |