Change ptw-20110307-zoA by [email protected] on 2011-03-07 19:12:56 EST
    in /Users/ptw/OpenLaszlo/trunk-devo
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Reduce overhead of dynamic CSS styles

Bugs Fixed: LPP-8945 Dynamic CSS rules need better caching

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)

Overview:

    Move the selection of dynamic CSS rules to getPropertyCache so
    that getRulesCache is only executed once (or if new style rules
    are added) rather than each time a dynamic rule dependency
    changes.  This makes a very slight penalty on the first
    application of styles, but subsequent updating of dynamic rules
    has its overhead significantly reduced.

Details:

    LzCSSStyle:  Rules now have a flag to tell if they are dynamic
    (i.e., their selector includes an attribute value test).
    getPropertyCache only selects dynamic rules that apply now.
    Simplified the CSS constraint application:  all constraints are
    computed in getRulesCache and applied then, including the implicit
    constraint on the parent's inherited property cache.  Simplified
    getRulesCache to cache all potentially applicable rules, including
    all possible dynamic rules.  Generalize _compoundSelectorApplies
    to be callable for gathering dependencies or determining
    applicability, and for completing an already matched tail or doing
    a full (anchored) match.

    LzDebug:  Fix brain-oh in explainStyleBindings, only explain
    currently applicable dynamic rules.

    LzNode:  Simplify __applyCSSConstraints, don't flush rules cache
    for __reapplyCSS.

    PresentationTypes:  Add missing type alias `token`.

Tests:

Files:
M       WEB-INF/lps/lfc/services/LzCSSStyle.lzs
M       WEB-INF/lps/lfc/debugger/LzDebug.lzs
M       WEB-INF/lps/lfc/core/LzNode.lzs
M       WEB-INF/lps/lfc/core/PresentationTypes.lzs

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110307-zoA.tar

Reply via email to