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

Add new option to cache style and $truncateWorker when working with multiple elements. #17

Merged
merged 3 commits into from
May 21, 2014

Conversation

kriserickson
Copy link
Contributor

If you have a bunch of elements with the same style and you run truncate it can be very slow (was seeing up to 2 second browser freezes with 50 elements). Caching the style and $truncateWorker from outside of the loop can reduce this to 10ms (element creation and is very slow in jQuery). Obviously only useful if your elements share the same style.

@tbasse
Copy link
Owner

tbasse commented May 21, 2014

Awesome, thanks!

tbasse added a commit that referenced this pull request May 21, 2014
Add new option to cache style and $truncateWorker when working with multiple elements.
@tbasse tbasse merged commit 1a7713d into tbasse:master May 21, 2014
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.

2 participants