Skip to content

Conversation

@matthewtff
Copy link
Contributor

Calling toString on Object may cost a lot. It's much better to
have cached value for it.

Calling toString on Object may cost a lot. It's much better to
have cached value for it.
@gaearon
Copy link
Contributor

gaearon commented Oct 23, 2015

In general we don't want to diverge from Lodash implementation because we're going to eventually use it (#611). Can you update the code to what Lodash uses in 4.0 instead?

@matthewtff
Copy link
Contributor Author

Not sure if it's a good idea. Looks like in lodash isPlainObject has internal dependencies.
So I'll have to bring here at least several core functions. Also it would make me to write own) or also copy-paste) some tests. What I'm doing here is a small, straightforward optimization. Just to live here until lodash gets shipped...

@gaearon
Copy link
Contributor

gaearon commented Oct 23, 2015

Seems straightforward enough.

gaearon added a commit that referenced this pull request Oct 23, 2015
@gaearon gaearon merged commit 82b75d6 into reduxjs:master Oct 23, 2015
@matthewtff matthewtff deleted the cache-object-string-value branch October 28, 2015 13:31
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.

2 participants