Skip to content

Don't convert arg values returned by http function#355

Merged
bajtos merged 1 commit into
masterfrom
fix/traversal-of-computed-http-args
Sep 21, 2016
Merged

Don't convert arg values returned by http function#355
bajtos merged 1 commit into
masterfrom
fix/traversal-of-computed-http-args

Conversation

@bajtos

@bajtos bajtos commented Sep 20, 2016

Copy link
Copy Markdown
Member

When an argument provides "http" mapping as a custom function, then we should not traverse the return value to detect buffers and dates. The return value could be a complex object, e.g. the full remoting context, in which case the traversal takes too long (in order of seconds!).

I discovered this issue while playing with a solution for injecting context via options argument (see strongloop/loopback#1495 and the pull request strongloop/loopback#2762).

@ritch @richardpringle or @deepakrkris please review

When an argument provides "http" mapping as a custom function, then
we should not traverse the return value to detect buffers and dates.
The return value could be a complex object, e.g. the full remoting
context, in which case the traversal takes too long (in order of
second!).
@bajtos
bajtos force-pushed the fix/traversal-of-computed-http-args branch from 3091ad4 to 062d391 Compare September 20, 2016 13:04

@richardpringle richardpringle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ritch

ritch commented Sep 20, 2016

Copy link
Copy Markdown
Member

👍

@bajtos
bajtos merged commit a27cae5 into master Sep 21, 2016
@bajtos
bajtos deleted the fix/traversal-of-computed-http-args branch September 21, 2016 07:55
@bajtos bajtos removed the #review label Sep 21, 2016
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.

4 participants