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

Make ULS language selector appear faster after clicking trigger #122

Merged
merged 1 commit into from
Dec 20, 2013

Conversation

Nikerabbit
Copy link
Member

  • Removed unused class end.
  • Class uls-lcd-region-section was used in two different elements,
    retained it on the outer one.
  • Build a list of languages per region, once done render the regions at once.
  • Use direct dom manipulation in hot spots.
  • Use shorter selectors like children instead of find and dropping the tag name.
  • Fixed mismatch when there were no results and when the message was shown.
  • Less flickering by not hiding or showing regions unnecessary
  • Cache the common languages "quicklist"
  • Added itemsPerColumn as an option

Reduces time used to show language selector after clicking the trigger on my
machine from about 1.8s to about 380 ms (JS execution times, actual times are
about the same but little bigger. The actual rendering is now less than 100ms,
the rest is other setup overheard and $.fn.scrollIntoView which can take many
hundreds of milliseconds.

* Removed unused class end.
* Class uls-lcd-region-section was used in two different elements,
  retained it on the outer one.
* Build a list of languages per region, once done render the regions at once.
* Use direct dom manipulation in hot spots.
* Use shorter selectors like children instead of find and dropping the tag name.
* Fixed mismatch when there were no results and when the message was shown.
* Less flickering by not hiding or showing regions unnecessary
* Cache the common languages "quicklist"
* Added itemsPerColumn as an option

Reduces time used to show language selector after clicking the trigger on my
machine from about 1.8s to about 380 ms (JS execution times, actual times are
about the same but little bigger. The actual rendering is now less than 100ms,
the rest is other setup overheard and $.fn.scrollIntoView which can take many
hundreds of milliseconds.
@ghost ghost assigned santhoshtr Dec 20, 2013
santhoshtr added a commit that referenced this pull request Dec 20, 2013
Make ULS language selector appear faster after clicking trigger
@santhoshtr santhoshtr merged commit d1a007e into wikimedia:master Dec 20, 2013
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-UniversalLanguageSelector that referenced this pull request Dec 20, 2013
* Localization updates.
* Added localization for Dutch informal.
* Performance improvements - see
  wikimedia/jquery.uls#122

Change-Id: I6a76097722ae7ab2774172838823d73da5050581
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-UniversalLanguageSelector that referenced this pull request Dec 31, 2013
The end class was removed at
wikimedia/jquery.uls#122

Change-Id: I548df1f14025cac0c4a89401474171d0558ff8b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants