[limb-issues] Created: (WACT-15) Generate more compact compiled template code using an unique id for every component

Sergey Yudin (JIRA) jira at limb-project.com
Sun Feb 4 23:36:03 MSK 2007


Generate more compact compiled template code using an unique id for every component
-----------------------------------------------------------------------------------

                 Key: WACT-15
                 URL: http://jira.limb-project.com/browse/WACT-15
             Project: WACT
          Issue Type: Improvement
    Affects Versions: 0.3
            Reporter: Sergey Yudin
             Fix For: 0.3


For now every component in a compiled template registers in runtime component tree. This is OK, but WactRuntimeComponentTag :: getComponentRefCode() generates a bit overbloated code in my mind. I think if we assign an unique ID for every component we can shorten compiled template a lot and make it faster.

For example:
$root->children['id00166']->children['id00154']->children['login_form']->addChild(new WactFormElement("submitted"));

will go into something like:
$id00101 = new WactFormElement("submitted");
$id00100->addChild($id00101);

And further in compiled template instead:
$root->children['id00166']->children['id00154']->children['login_form']->children['id0037']->renderAttributes();

will be just:
$id00223->renderAttributes();

There is also a disadvantage of this refactoring: compiled template will be more difficult to debug but i think it's a minor inconvenience

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.limb-project.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the limb-issues mailing list