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

Performance for dynamic and heavy modal content #335

Open
murugaratham opened this issue Mar 1, 2017 · 7 comments
Open

Performance for dynamic and heavy modal content #335

murugaratham opened this issue Mar 1, 2017 · 7 comments

Comments

@murugaratham
Copy link

Summary:

Steps to reproduce:

  1. Created an array of objects to be loaded after openModal is triggered
  2. I did a .Map and return ~100 items
  3. On desktop, the delay is 2-3s

Expected behavior:

Opening and closing modal should not rerender/update modal content

Additional notes:

Can add a prop to disable shouldComponentUpdate?

@diasbruno
Copy link
Collaborator

@murugaratham hmm,...maybe you can extend the Modal and use shouldComponentUpdate.

class MyModal extends Modal {
  shouldComponentUpdate() { ... }
}

@diasbruno
Copy link
Collaborator

@murugaratham is the patch above solves your issue or did you found out another way?

@alex-shamshurin
Copy link

The same is here - with react-datepicker it's very slow. Especially on mobiles.

@diasbruno
Copy link
Collaborator

Hi @alex-shamshurin, can you provide more info about this?

@diasbruno
Copy link
Collaborator

Can you provide a reproducible example of your problem?

@alex-shamshurin
Copy link

alex-shamshurin commented Dec 13, 2017

Sorry, I discovered a problem is in react-datepicker itself (in my configuration).

@diasbruno
Copy link
Collaborator

Ok. Thanks @alex-shamshurin.

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

No branches or pull requests

3 participants