Menu

Performace of Layout in GVF

sam
2003-03-15
2003-03-19
  • sam

    sam - 2003-03-15

    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())

     
    • yugen

      yugen - 2003-03-19

      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)?

       

Log in to post a comment.