action_base_update: remove data duplication in generated postback #267

Closed
helllamer opened this Issue Nov 24, 2011 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

helllamer commented Nov 24, 2011

{% wire id="some_trigger_id" 
        action={update templat="template.tpl"
                       target="some_target_id"
                       var1="value1"
                       var2="value2"} %}

action_base_update generates following postback:

{undefined,"some_trigger_id", "some_target_id",
       {render,insert_bottom,
               {render,"template.tpl",
                       [{target,"some_target_id"},
                        {template,"template.tpl"},
                        {var1,"value1"},
                        {var2,"value2"} ]},
               [{target,"some_target_id"},
                {template,"template.tpl"},
                {var1,"value1"},
                {var2,"value2"} ]},
       action_base_update}

It is only action_base_update's postback, not wire result at all.

Summary:

  • template and target_id pickled 3 times
  • Args list and trigger_id pickled 2 times
  • ~400 bytes in base64

It will be good to save CPU cycles and traffic, because outer Args list almost unused by action_base_update:render_inline().

Owner

mworrell commented Nov 28, 2011

Good catch. We have to check how&what is encoded in the requests. Maybe we can also make some lists binary, as I guess they will be smaller that way.

mworrell was assigned Nov 28, 2011

mworrell closed this Apr 22, 2015

@mworrell mworrell modified the milestone: Enhancements for later Apr 22, 2015

mworrell removed the enhancement label Apr 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment