Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

optimizing the cache key for instances by relying on type and base only #720

Merged
merged 1 commit into from

2 participants

@caridy
Owner

this should fix any memory allocation when using id as part of the instance object before expanding it. also, shaker does not use action anymore, so we are removing it.

@caridy caridy optimizing the cache key for instances by relying on type and base on…
…ly. this should fix any memory allocation when using id as part of the instance object before expanding it. also, shaker does not use action anymore, so we are removing it.
0fac8e2
@drewfish
Owner

+1

@caridy caridy merged commit a62778c into yahoo:develop-perf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
  1. @caridy

    optimizing the cache key for instances by relying on type and base on…

    caridy authored
    …ly. this should fix any memory allocation when using id as part of the instance object before expanding it. also, shaker does not use action anymore, so we are removing it.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/app/autoload/store.server.js
View
8 lib/app/autoload/store.server.js
@@ -528,11 +528,12 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
*/
expandInstanceForEnv: function(env, instance, ctx, cb) {
+ // TODO: fakeInstance could be even more optimized, where
+ // type has priority over base, and only one of them is really
+ // needed.
var fakeInstance = {
base: instance.base,
- action: instance.action,
- type: instance.type,
- id: instance.id
+ type: instance.type
},
posl = this.selector.getPOSLFromContext(ctx),
// We need to include the lang, since it's a part of the context
@@ -561,7 +562,6 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
return cb(err);
}
spec.config = spec.config || {};
- spec.action = spec.action || 'index';
if (!spec.instanceId) {
spec.instanceId = Y.guid();
}
Something went wrong with that request. Please try again.