Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for expandinstace so we dont copy the params object #603

Merged
merged 10 commits into from

3 participants

@diervo

Performance boost!

diervo added some commits
@diervo diervo removed lang dependencies from binders.
The langs are already dependencies of the controller so we dont need it
here. It's causing the langs to get deployed always to the client.
8ce3829
@diervo diervo expandInstance fix to avoid the param copy 0663799
@diervo diervo pull back changes 16e88bc
@drewfish
Owner

This is missing child.config which is very important I suspect.

@diervo

This is a Ric and I fix for avoid the overhead of copying the params. It seems that is working fine..
It was never there in the first place...

@diervo

This is input to the composite addon, and in the docs seems that we dont need the config at all. It only mention params:

cfg = {
    children: {
        slot-1: {
            type: "default",
            action: "index"
        },
        slot-2: {
            type: "default",
            action: "index",
            params: {
                route: {},
                url: {},
                body: {},
                file: {}
            }
        }
    },
    assets: {}
}
@drewfish
Owner

I think child.config is needed by other users.

@diervo

I just added the config to the PR :)

@caridy caridy merged commit a01d12a into yahoo:develop-perf

1 check failed

Details default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 5, 2012
  1. @diervo

    removed lang dependencies from binders.

    diervo authored
    The langs are already dependencies of the controller so we dont need it
    here. It's causing the langs to get deployed always to the client.
Commits on Oct 9, 2012
  1. @diervo
  2. @diervo

    pull back changes

    diervo authored
  3. @diervo
Commits on Oct 10, 2012
  1. @diervo
  2. @diervo
  3. @diervo
  4. @diervo

    Revert "changed the action for the default"

    diervo authored
    This reverts commit c5a325efcd882b19db69bb5f2787a9ac5a98a2f2.
Commits on Oct 25, 2012
  1. @diervo
Commits on Oct 31, 2012
  1. @diervo
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 2 deletions.
  1. +12 −2 lib/app/addons/ac/composite.common.js
View
14 lib/app/addons/ac/composite.common.js
@@ -312,16 +312,26 @@ callback({
child = children[childName];
// Create a buffer for the child
buffer[childName] = {name: childName, data: '', meta: {}};
-
// Make a new "command" that works in the context of this
// composite
newCommand = {
- instance: child,
+ instance: {
+ id: child.id,
+ action: child.action,
+ config: child.config || {}
+ },
// use action in child spec or default to index
action: child.action || 'index',
context: command.context,
params: child.params || command.params
};
+ if (child.base) {
+ newCommand.instance.base = child.base;
+ } else if (child.type) {
+ newCommand.instance.type = child.type;
+ } else {
+ throw new Error('No type or base founded');
+ }
childAdapter = new AdapterBuffer(buffer, childName,
callback);
Something went wrong with that request. Please try again.