Skip to content
Myr

Clone / reverse plugins ONCE

Before adoption: this commit came in with the history the project adopted, so no landing records it.

huuuuge performance boost

authored by visionmedia · committed by visionmedia · parent d712fae · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:lib/express/request.js+2 added-1 removed
58 unmodified lines
59 this.params.post = this.params.post || {}60 this.plugins = Express.plugins.map(function(plugin){61 return new plugin.klass(plugin.options) 62 })63 this.reversedPlugins = this.plugins.splice(0).reverse() 64 },65 66 /**67 * Set response header _key_ and _val_ or get
256 unmodified lines
324 var self = this,325 complete = 0,326 total = this.plugins.length,327 plugins = reverse327 ? self.plugins.reverse()328 ? self.reversedPlugins329 : self.plugins330 ;(function next(err) {331 if (err || complete === total)332 callback(err)
106 unmodified lines