While this might not be related to performance as speed, it is important in the jquery mobile context that you properly add scripts to pages. Plain old $(function(){}) will surprise you. It doesn't work in some cases.
When a link is clicked jquery mobile fetches the page with ajax and adds its content to the currently open page ignoring everything you put in the <head>. [This is true as of jqm 1.0a2]
There are two ways of adding scripts that will work:
- putting all scripts in a single .js file and link them in the head of all pages of your app and work with events that jqm provides (pageshow and pagecreate ones).
- putting scripts at the bottom of the body and NOT require DOMready to fire.
The second way might be better for performance in big applications, where there are a lot of scripts that the user might not use (not visiting certain pages). I would recommend the first way - it's cleaner and jqm seems to encourage it.
A hybrid of both might be what's best - adding a pageshow event handler thet would trigger some default function from each loaded page.
[edit]
see Limitations here at the bottom of the page.