Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Search perf #514

Closed
wants to merge 4 commits into from

3 participants

@dmorilha

9/12 by 6:30pm we discovered we should consider a subset of the actual instance as part of the cache key. otherwise things from the request may get included (post parameters, headers, get parameters, etc...)

@imalberto imalberto commented on the diff
lib/store.server.js
@@ -541,7 +541,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
*/
expandInstanceForEnv: function(env, instance, ctx, cb) {
- var cacheKey = JSON.stringify([instance, ctx]),
+ var cacheKey = JSON.stringify([instance.action, instance.base, action.id, action.type, ctx]),
@imalberto Owner

instance.base might be undefined ?
"action" is not declared or set within the scope;

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

@dmorilha @imalberto do we really need this after all? if yes, can you clean it?

@imalberto
Owner

This PR has been superceded by PR#517. @dmorilha , can you please close this PR ?

@dmorilha dmorilha closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 14, 2012
  1. diffs for search on the war room while is sunny outside

    Daniel Vitor Morilha authored
  2. cool stuff

    Daniel Vitor Morilha authored
  3. Merge branch 'search-perf' of git://github.com/yahoo/mojito into sear…

    Daniel Vitor Morilha authored
    …ch-perf
  4. changing the instance a little more

    Daniel Vitor Morilha authored
This page is out of date. Refresh to see the latest.
View
4 lib/app/autoload/action-context.common.js
@@ -225,7 +225,7 @@ YUI.add('mojito-action-context', function(Y, NAME) {
for (addonName in dependencies) {
if (dependencies.hasOwnProperty(addonName)) {
- if (mods.indexOf(addonName + '-addon') > -1 || addonName === 'core') {
+ //if (mods.indexOf(addonName + '-addon') > -1 || addonName === 'core') {
addon = new addons[addonName](command, adapter, ac);
if (addon.namespace) {
ac[addon.namespace] = addon;
@@ -233,7 +233,7 @@ YUI.add('mojito-action-context', function(Y, NAME) {
addon.setStore(store);
}
}
- }
+ //}
}
}
}
View
6 lib/store.server.js
@@ -541,7 +541,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
*/
expandInstanceForEnv: function(env, instance, ctx, cb) {
- var cacheKey = JSON.stringify([instance, ctx]),
+ var cacheKey = JSON.stringify([instance.action, instance.base, action.id, action.type, ctx]),
@imalberto Owner

instance.base might be undefined ?
"action" is not declared or set within the scope;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
cacheValue = this._expandInstanceCache[env][cacheKey],
spec,
typeDetails,
@@ -586,8 +586,8 @@ YUI.add('mojito-resource-store', function(Y, NAME) {
spec.config = config;
}
- this._expandInstanceCache[env][cacheKey] = Object.freeze(spec);
- cb(null, spec);
+ this._expandInstanceCache[env][cacheKey] = spec;
+ cb(null, Y.mojito.util.copy(spec));
},
Something went wrong with that request. Please try again.