You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Renaud Bruyeron <br...@fullsix.com> on 2007/04/19 13:09:44 UTC

why compile with debug=off ?

In the build.xml I see this:

     <property name="debug"              value="off"/>

Is there a good reason for this? FWIU, debug=on has negligible impact on 
performance/size, but it has a massive impact on ease of debugging. 
Right now I can't get useful stacktraces out of batik because the stack 
does not have line numbers.

Thoughts?

  - Renaud


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Re: why compile with debug=off ?

Posted by Renaud Bruyeron <br...@fullsix.com>.
thomas.deweese@kodak.com wrote:
> Hi Renaud,
> 
> news <ne...@sea.gmane.org> wrote on 04/19/2007 07:09:44 AM:
> 
>> In the build.xml I see this:
>>
>>      <property name="debug"              value="off"/>
>>
>> Is there a good reason for this? FWIU, debug=on has negligible impact on 
> 
>> performance/size, but it has a massive impact on ease of debugging. 
> 
>    It has a fairly significant impact on size, so we intentionally
> don't include debug in our release builds.

I stand corrected:
off: batik-all.jar=3163839
on: batik-all.jar=3990686

That's 25% increase in size :-) However, given that batik is already 
above 3MB in size, I don't think carrying another 800KB really matters, 
unless you are on a tight platform (embedded or similar).

>> Right now I can't get useful stacktraces out of batik because the stack 
>> does not have line numbers.
> 
>    Create a build.properties file in the same directory as the build.xml
> (top level of dist), with the one line "debug=on" in it.  That way your
> builds will always have debug info.

build-local.properties - yep that's what I ended up doing. I had to 
check out trunk to correct a couple of issues (see my bugzillas) anyway :-)
One needs to build from source to enable it though: if you are a maven2 
user you are stuck with the jar in the official repository that does not 
have debug info...( 
http://issues.apache.org/bugzilla/show_bug.cgi?id=42168 *hint* *hint*)

What about this: release the standard build with debug=on and provide an 
alternative (=for low memory platforms) build without debug info (or 
provide both in the standard distrib).

  - Renaud


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Re: why compile with debug=off ?

Posted by th...@kodak.com.
Hi Renaud,

news <ne...@sea.gmane.org> wrote on 04/19/2007 07:09:44 AM:

> In the build.xml I see this:
> 
>      <property name="debug"              value="off"/>
> 
> Is there a good reason for this? FWIU, debug=on has negligible impact on 

> performance/size, but it has a massive impact on ease of debugging. 

   It has a fairly significant impact on size, so we intentionally
don't include debug in our release builds.

> Right now I can't get useful stacktraces out of batik because the stack 
> does not have line numbers.

   Create a build.properties file in the same directory as the build.xml
(top level of dist), with the one line "debug=on" in it.  That way your
builds will always have debug info.

   This approach avoids issues with forgetting to turn off debug when
checking in changes to build.xml, or forgetting to change build.xml
before doing a release etc.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org