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

Optimize each routine #311

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ydaniv
Copy link

@ydaniv ydaniv commented May 23, 2014

I've tried taking a different approach here with batching together DOM changes:

  • Using DocumentFragments for batching elements that need to be added/moved.
  • Not reusing existing elements, hence no update() calls which potentially also manipulate every bound attribute on elements iteratively.
  • Resolving diffs between the data first and DOM later, which results in a single change when items are shifted/unshifted to the collection.

To my dismay, results are still a quite inconclusive: http://jsperf.com/rivets-each-optimization-bulk-add/4
There are still quite some optimizations that can be done to reduce iterations in the code.

Perhaps this will be of interest to you in investigating directions in optimization.

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.

None yet

1 participant