Item13018: switching tabs is slow

pencil
Priority: Enhancement
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Extension
Component: JQueryPlugin
Branches: master
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
Compare these two:

jquery.tabpane

Tab 1

tab1 Integer a nisi eget libero fermentum ultricies non ut sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non porta risus. Phasellus vel tortor ac lectus scelerisque rutrum. Suspendisse bibendum lobortis turpis; sit amet eleifend dolor vulputate sit amet! Morbi eget mi nisi, quis consequat ligula. Praesent sit amet dui nec enim hendrerit lacinia non vel

Tab 2

tab2 Integer a nisi eget libero fermentum ultricies non ut sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non porta risus. Phasellus vel tortor ac lectus scelerisque rutrum. Suspendisse bibendum lobortis turpis; sit amet eleifend dolor vulputate sit amet! Morbi eget mi nisi, quis consequat ligula. Praesent sit amet dui nec enim hendrerit lacinia non vel

Tab 3

tab3 Integer a nisi eget libero fermentum ultricies non ut sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non porta risus. Phasellus vel tortor ac lectus scelerisque rutrum. Suspendisse bibendum lobortis turpis; sit amet eleifend dolor vulputate sit amet! Morbi eget mi nisi, quis consequat ligula. Praesent sit amet dui nec enim hendrerit lacinia non vel

jquery.ui tabs

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.
Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.

Switching tabs using jquery.tabpane is considerably slower. I've found out that this is due to setting the hash property in window.location For some reason browsers now are tripped into some sort of repaint event when the hash changes:

window.location.hash = 'foo';

There are some other people on the web having the same problem. The recommended solution always was not to maintain a hash navigation then.

Hashes have been set in the navigation to facilitate browser navigation (back and forth buttons) when switching tabs. I'll disable this feature as its benefit doesn't outweigh the performance issue in the user interface.

-- MichaelDaum - 01 Sep 2014

 
Topic revision: r3 - 05 Jul 2015, GeorgeClark - This page was cached on 09 Dec 2016 - 03:09.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License