Changes between Version 9 and Version 10 of AdvancedStylization


Ignore:
Timestamp:
12/31/09 20:52:14 (15 years ago)
Author:
jbirch
Comment:

Added performance tip

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedStylization

    v9 v10  
    3434
    3535 * [wiki:AdvancedStylization/Library/Transportation Transportation]
     36
     37
     38== Performance Tips ==
     39
     40These can be split out to their own page later if necessary
     41
     42=== Avoid invoking expression engine ===
     43
     44Advanced stylization is incredibly powerful in allowing you to alter almost every part of a style using feature properties and expressions.  However, when this is not needed it can be an unwanted performance burden.  From Walt Welton-Lair on the mailing list:
     45
     46 For color, numeric, and boolean properties you don't need quotes.  The code first tries to evaluate the property as a constant, and only if that fails does it invoke the FDO expression engine.
     47
     48 For properties which are evaluated as strings, use single quotes to avoid invoking the expression engine.  Examples:
     49
     50 Specifying a constant label text:
     51{{{
     52<Text>'Park'</Text>
     53}}}
     54
     55 Specifying a constant enumerated value:
     56{{{
     57<HorizontalAlignment>'Center'</HorizontalAlignment>
     58}}}
     59
     60 In both examples leaving out the quotes will give the same result, but it will be slower.
     61
     62