Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached Object string representation #942

Merged
merged 1 commit into from Oct 23, 2015
Merged

Cached Object string representation #942

merged 1 commit into from Oct 23, 2015

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.

None yet

2 participants