The spinner shows while content is being fetched via Ajax. If your page stall afterwards or without spinner, this is when JQM renders what has been fetched. For example take a list item:
- <li><a href="some.html">link</a></li>
which JQM converts into:
- <li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c">
- <div class="ui-btn-inner ui-li">
- <div class="ui-btn-text">
- <a href="index.html" class="ui-link-inherit">Audi</a>
- </div>
- <span class="ui-icon ui-icon-arrow-r ui-icon-shadow"> </span>
- </div>
- </li>
Now you might argue whether this makes sense or not ( I think it does, because the structure is coherent across all JQM widgets), but it sure takes time to convert your list item into a JQM list item.
The same goes for all widgets so depending on how much stuff your page contains, it will stall while the page is being enhanced.
I have been trying to lot to cut down on the stalling. One way is to send enhanced markup vs plain HTML and just insert this into your page. However you cannot call trigger("create") on these elements, because doing so, will re-enhance them (breaks the widget, looks funny). The trick would be to modify JQM so calling trigger("create") with something like data-create="false" would only add the event bindings and not do any HTML manipulation. I'm working on something like this, but so far I only have it for buttons, controlgroups, collapsibles and the collapsible-set widget. Sitting on listview which is the hardest.
For the elements you can use this, you will have almost 0 stalling, which feels pretty nice. I will publish what I have so far in a while to my JQM factory repo. But will be a while.