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

perf(spread/pips): use a buffer and use innerHTML only once #601

Merged
merged 2 commits into from
Feb 14, 2016

Conversation

vvo
Copy link
Contributor

@vvo vvo commented Feb 11, 2016

Before:

2016-02-11-160347_397x398_scrot

After:

2016-02-11-160444_211x322_scrot

Measured on the test page with console.time

@vvo
Copy link
Contributor Author

vvo commented Feb 11, 2016

@leongersen I wonder why we need to remove css classes before emptying? To be more precise, why can't we just remove completely the scope_Target?

vvo pushed a commit to algolia/instantsearch that referenced this pull request Feb 11, 2016
@leongersen
Copy link
Owner

Because the slider might have user classes, as well as the classes applied by the plugin.

@leongersen
Copy link
Owner

The innerHTML change makes sense, I'm merging multiple pull requests -including this one- now.

@vvo
Copy link
Contributor Author

vvo commented Feb 14, 2016

The innerHTML change makes sense, I'm merging multiple pull requests -including this one- now.

I think we should also keep the removeChild (but keep the removal of css classes, sorry I removed this without a full thinking)

@leongersen
Copy link
Owner

Yes, I'm replacing innerHTML with the loop.

@leongersen leongersen merged commit 1b6fcef into leongersen:master Feb 14, 2016
@vvo vvo deleted the perf/pips-perf branch February 14, 2016 16:40
@leongersen leongersen removed the inDev label Feb 14, 2016
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