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

feat(collectionRepeat): huge optimization upgrades #1597

Closed
wants to merge 1 commit into from

Conversation

ajoslin
Copy link
Contributor

@ajoslin ajoslin commented Jun 9, 2014

Optimizations done thanks to ideas and questions thrown around by the team:

  1. Only compile as many elements as the list needs visible at start, plus 50 for safety (but if more are really needed, they can be compiled)
  2. Reuse elements as they go out instead of compiling new ones
  3. Reuse scopes - simply extend the existing scope with the new item in the list's value and digest it.
  4. Transform the scroller container normally so the items themselves need to only be transformed once. Before, it would scroll the container back up every time an item was scrolled past.
  5. Elements that aren't currently visible are kept in the DOM (to save the time wasted by attaching them), but are set to visibility: hidden

TODO:

  • Fix .destroy()
  • Patch up unit tests
  • remove logging statements

What's new?

  • Can handle a LOT MORE with no lag. It works as expected now.

@robdmoore
Copy link

🍰 woo! can't wait to see this.

@CoenWarmer
Copy link

Me too!! 👍

@ajoslin
Copy link
Contributor Author

ajoslin commented Jun 10, 2014

Ready for review

@ajoslin ajoslin closed this in 6af5d68 Jun 11, 2014
@adamdbradley adamdbradley deleted the collection-repeat-optimize branch January 20, 2016 14:46
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

Successfully merging this pull request may close these issues.

3 participants