I look at the source of some layout algorithm, it has log statement like this:
s_debug.log(DEBUG, "getSize("+node+", "+graph+")", "Using default = "+getDefaultNodeSize());
I would like it will be more efficient if the log statement is wrapped with this:
if (s_debug.enable) {
This is because it still constructs String like these even if logging is OFF. Am I correct?
"getSize("+node+", "+graph+")"
"Using default = "+getDefaultNodeSize())
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are right -- the string gets built even if logging is turned off. Your suggested change might be useful for the next release of Royere. Are you noticing a significant performance hit? How many nodes are in your graph(s)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I look at the source of some layout algorithm, it has log statement like this:
s_debug.log(DEBUG, "getSize("+node+", "+graph+")", "Using default = "+getDefaultNodeSize());
I would like it will be more efficient if the log statement is wrapped with this:
if (s_debug.enable) {
s_debug.log(DEBUG, "getSize("+node+", "+graph+")", "Using default = "+getDefaultNodeSize());
}
This is because it still constructs String like these even if logging is OFF. Am I correct?
"getSize("+node+", "+graph+")"
"Using default = "+getDefaultNodeSize())
You are right -- the string gets built even if logging is turned off. Your suggested change might be useful for the next release of Royere. Are you noticing a significant performance hit? How many nodes are in your graph(s)?