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

Element migration from one parent to another. #7460

Closed
kof opened this issue Aug 10, 2016 · 4 comments
Closed

Element migration from one parent to another. #7460

kof opened this issue Aug 10, 2016 · 4 comments

Comments

@kof
Copy link

kof commented Aug 10, 2016

Do you want to request a feature or report a bug?

Feature request.

What is the current behavior?

Currently there is no high performance way to move a rendered element from one parent to another. It causes a lot of overhead, because it requires a full mountComponent in the new place, even if we reuse the component instance itself.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

All.

Why we need this

I am trying to optimize one specific case: I need to render a component invisibly in order to measure it's dimensions. After that I need to render same component in the visible area. Currently I need to buy an overhead (in my case 15-50ms) to do so, where in fact, when done in pure DOM, it is a simple .appendChild call with almost no overhead.

To be more specific here, I am talking about react-virtualized library and more specific it's CellMeasurer component, which can become 50% faster if we can avoid that overhead.

@gaearon
Copy link
Collaborator

gaearon commented Aug 10, 2016

This seems like the same issue as #3965.

@kof
Copy link
Author

kof commented Aug 10, 2016

Oh yes thanks, over a year old ...

@gaearon
Copy link
Collaborator

gaearon commented Aug 10, 2016

It’s a hard problem. 😄

@aweary
Copy link
Contributor

aweary commented Aug 12, 2016

Since the conversation is continuing in #3965, I'm going to close this 😄

@aweary aweary closed this as completed Aug 12, 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

No branches or pull requests

3 participants