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

All items gets rebuilt when dragging a single item #41

Open
naamapps opened this issue Aug 6, 2024 · 4 comments
Open

All items gets rebuilt when dragging a single item #41

naamapps opened this issue Aug 6, 2024 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@naamapps
Copy link
Contributor

naamapps commented Aug 6, 2024

Hi,
Is it normal for this package that all grid items gets rebuilt when dragging a single item? (even when just hovering in place without actually reordering anything).
My app takes a major performance hit because of this.
I would expect that the items won't get rebuilt but only their transform would be changed.
Is there any way to optimize this?

Thanks

@casvanluijtelaar
Copy link
Owner

Hey,
do you have some more data about what unexpected rebuilds are happening? when dragging an item, all items will have to recalculate their position and constraints.

@casvanluijtelaar casvanluijtelaar added the question Further information is requested label Aug 7, 2024
@naamapps
Copy link
Contributor Author

Hey @casvanluijtelaar,
Should it really rebuild All items? I think an optimization could really improve this package - so it would know which items needs rebuilding lazily.
For example I have a grid of 2 items in a row, when ordering an item in the first row to the second position in the same row, not all items needs rebuilding, but just the two items in the first row..

@casvanluijtelaar
Copy link
Owner

maybe probably, but right now these items need to recalculate their position to know if they should move or not. if you have suggestions, I'd love to hear them!

@casvanluijtelaar casvanluijtelaar added the help wanted Extra attention is needed label Aug 23, 2024
@naamapps
Copy link
Contributor Author

Does the item need to rebuild even if it's position is not changed?
Every finger movement causes a rebuild for all items. I think maybe a check if the position is changed then the item needs to be rebuilt. Don't know if it's possible though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants