Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33386

Style Declaration Matching Tuning - Inlining

    XMLWordPrintableJSON

Details

    Description

      One of the most executed calls during the lifetime of a Flex UIComponent is the matching of style declarations (i.e. state change, component initialization, etc).

      As such, it is one that the community has monkey-patched often in order to attain speed-ups even for just a little.

      This is one of the improvements done to achieve that end. Instead of doing method calls to the different style classes (i.e. CSSCondition, CSSSelector, CSSStyleDeclaration), the StyleProtoChain class has been modified to perform matching inline as much as possible.

      The implementation is not perfect and I'm sure it can be improved further with the help of the bigger community. For example, the matchingDecls.sortOn("selectorIndex", Array.NUMERIC) call could be improve to use one of the faster sort algorithms out there. There are also some methods calls that are not inlined.

      Attachments

        1. mx.styles - inlined.zip
          22 kB
          RJ Camarillo

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rj.camarillo RJ Camarillo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: