kitsonk/dojo — comment on commit ba9465fcd1207b12a056a8f91ff76f27d976c6f9
File: parser.js line 586
By wkeese:

Hmm well I hate to see the repeated code so I'd prefer to consolidate it, despite the 2-3% performance issue.

The other simplification would be to convert:

```javascript
while(obj = objects[idx++]){
type = obj.type;
if (~type.indexOf('/') && !(type in seen)){
seen[type] = true;
mids.push(type);
}
var mIdx = 0, mixin;
while(mixin = obj.mixins[mIdx++]){
if (~mixin.indexOf('/') && !(mixin in seen)){
seen[mixin] = true;
mids.push(mixin);
}
};

into

```javascript
while(obj = objects[idx++]){
var types = [obj.type].concat(obj.mixins), tIdx = 0, type;
while(type = types[tIdx++]){
if (~ type.indexOf('/') && !(type in seen)){
seen[type] = true;
mids.push(type);
}
};

I guess keeping mixins and the primary type in separate lists is a mistake. Probably if obj.type was a string like "dijit/form/Button,dijit/form/Mixin1" it would simplify the code overall a bit further?