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

Less performant deeper in the dom? #102

Open
patricktyndall opened this issue Mar 18, 2020 · 1 comment
Open

Less performant deeper in the dom? #102

patricktyndall opened this issue Mar 18, 2020 · 1 comment

Comments

@patricktyndall
Copy link

Great component. Is there any reason why this would perform worse at higher dom depths?

Debugging some performance issues and removing divs so far has been the only solution (and performance issues roughly scale with how deep it is). Looking at dev tools performance tab, looks like all the time is spent in script and not rendering.

I'm returning another in the same component at a shallower depth and it's silky smooth (and removing this one doesn't affect the performance of the other).

My reorder:

<Reorder placeholder={<div className="placeholder"/>} lock="vertical" reorderId={`reorder-small`} onReorder={(ev, prevIdx, nextIdx) => onReorderPhotos(prevIdx, nextIdx)}>
	{
		photoUrls.map((url, idx) => (
			<div style={{ backgroundImage:`url(${url})` }} className={'reorder-item'} key={idx} >

			</div>
		))
	}
</Reorder>

Sorry for limited info. I'm on 3.0.0-alpha.7. Thanks!

@JakeSidSmith
Copy link
Owner

Hi, do you mean the further down your DOM tree reorder is rendered the laggier it is?
Is reorder updating state that is much further up the tree?
Could you perhaps put together a full example?

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

2 participants