You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2007/07/30 23:20:52 UTC

[jira] Created: (TRINIDAD-133) SkinExtension's getTranslatedValue performance improvement

SkinExtension's getTranslatedValue performance improvement
----------------------------------------------------------

                 Key: TRINIDAD-133
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-133
             Project: MyFaces Trinidad
          Issue Type: Improvement
          Components: Skinning
            Reporter: Jeanne Waldman


 I wanted to log this TODO  to improve the performance of SkinExtension's getTranslatedValue:

// TODO Cache base skin's non-null translatedValue with this skin to
// make it faster.


 /**
    * Override of Skin.getTranslatedValue() which
    * supports pulling translations from Skin and if not found from the base Skin.
  */
  @Override
  public Object getTranslatedValue(
    LocaleContext lContext,
    String        key
    ) throws MissingResourceException
  {
    // Look for the skin's translated value (first bundle name, then registered bundles)
    // if that's not found, then look in the base skin's translated value.
    // getCachedTranslatedValue will protect against MissingResourceExceptions
    Object translatedValue = super.getCachedTranslatedValue(lContext, key);
    // TODO Cache base skin's non-null translatedValue with this skin to
    // make it faster.
    if (translatedValue == null)
      return getBaseSkin().getTranslatedValue(lContext, key);
    else
      return translatedValue;
  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TRINIDAD-133) SkinExtension's getTranslatedValue performance improvement

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman resolved TRINIDAD-133.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.2-core

Completed: At revision: 561398   AND
Completed: At revision: 561404  
on trunk
Files changed:
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinExtension.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinImpl.java


> SkinExtension's getTranslatedValue performance improvement
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-133
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-133
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Skinning
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>             Fix For: 1.2.2-core
>
>
>  I wanted to log this TODO  to improve the performance of SkinExtension's getTranslatedValue:
> // TODO Cache base skin's non-null translatedValue with this skin to
> // make it faster.
>  /**
>     * Override of Skin.getTranslatedValue() which
>     * supports pulling translations from Skin and if not found from the base Skin.
>   */
>   @Override
>   public Object getTranslatedValue(
>     LocaleContext lContext,
>     String        key
>     ) throws MissingResourceException
>   {
>     // Look for the skin's translated value (first bundle name, then registered bundles)
>     // if that's not found, then look in the base skin's translated value.
>     // getCachedTranslatedValue will protect against MissingResourceExceptions
>     Object translatedValue = super.getCachedTranslatedValue(lContext, key);
>     // TODO Cache base skin's non-null translatedValue with this skin to
>     // make it faster.
>     if (translatedValue == null)
>       return getBaseSkin().getTranslatedValue(lContext, key);
>     else
>       return translatedValue;
>   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.