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

List with lots of richTexts is loading slow(er) #164

Open
cloetensbrecht opened this issue Jun 15, 2022 · 3 comments
Open

List with lots of richTexts is loading slow(er) #164

cloetensbrecht opened this issue Jun 15, 2022 · 3 comments

Comments

@cloetensbrecht
Copy link
Contributor

When you have a list with a richText inside it and you fill the data with lost of list items, it every time generates the richText. Because of this, rendering all entered richText data seems to go slow when loading the view. It would be better to render them only when they are visible in the view (lazyload).

Playground: https://alinea.sh/playground#code/aW1wb3J0IHsKICB0eXBlLAogIGxpc3QsCiAgc2NoZW1hLAogIHJpY2hUZXh0Cn0gZnJvbSAnYWxpbmVhJwoKZXhwb3J0IGRlZmF1bHQgdHlwZSgnVHlwZScsIHsKICBkZXRhaWxzOiBsaXN0KCdEZXRhaWxzJywgewogICAgc2NoZW1hOiBzY2hlbWEoewogICAgICBkZXRhaWw6IHR5cGUoJ0RldGFpbCcsIHsKICAgICAgICBkZXNjcmlwdGlvbjogcmljaFRleHQoJ0Rlc2NyaXB0aW9uJykKICAgICAgfSkKICAgIH0pCiAgfSkKfSk=

Add a lot of details to it with some "Lorem Ipsum" data. When loading the page, rendering will be slow (difficult to test on the playground because the data is rendered while adding it, but when it's loaded from the json data file, you can see the problem).

@benmerckx
Copy link
Member

Could you narrow this down by using the performance profiler and/or the react profiler in the dev tools?

@cloetensbrecht
Copy link
Contributor Author

cloetensbrecht commented Jun 15, 2022

Hereby a screen capture from a click to an entry where only one richText element is present followed by a click where multiple richText fields are present. The runned tasks of the second click are running longer:

multiple_richTexts

image

Profile-20220615T095503.zip

@benmerckx
Copy link
Member

Can you check if this is still an issue with 0.5.12?

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

2 participants