Skip to content

Get rid of handler creation for each request. - #2

Merged
raymondfeng merged 2 commits into
masterfrom
refactor/remotes
Jul 2, 2013
Merged

Get rid of handler creation for each request.#2
raymondfeng merged 2 commits into
masterfrom
refactor/remotes

Conversation

@ritch

@ritch ritch commented Jul 1, 2013

Copy link
Copy Markdown
Member

Another benefit of the new module approach is that we don't have to load handlers dynamically. This PR refactors the rest middleware to remove that behavior. Now a handler is created once and recreated only if the exported modules change. Eg. if you call app.model().

The reason why we need this behavior at all is because sl-remoting's rest adapter builds routes based on the remotes.exports object.

@Schoonology

raymondfeng added a commit that referenced this pull request Jul 2, 2013
Get rid of handler creation for each request.
@raymondfeng
raymondfeng merged commit f45e241 into master Jul 2, 2013
@Schoonology

Copy link
Copy Markdown
Contributor

@ritch For the record, it works like a charm.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants