$.mobile.loading needs sleep and stops animating for background work

$.mobile.loading needs sleep and stops animating for background work

I'm working on a PhoneGap application and am using  jQueryMobile  for the UI .  The api for the JQM loader widget is really simple and for all of the small examples it works perfectly, however, I'm having two issues when trying to get it to work nicely when I actually need it to cover for long running tasks such as loading complex UI and saving data to the disk.  

The loading widget does not appear when I start it immediately before starting my long running task
In these cases, I have to wrap the call to start the long running task in setTimeout function.  If I wait for about 20 ms then the loader appears.

The loading widget stops animating very quickly
When the widget shows, it usually only animates for a portion of a second before the animation freezes.  This is counterproductive since the point of using the loading screen is to indicate that the app is still responsive.  It is better than no loader at all, but not what I would expect from the library.

I have looked for a while on various forums and have not seen any suggestions for either of these issues.  My hunch is that I'm simply expecting too much from JQM/PhoneGap for the app that I'm writing and should argue for native implementations in the future, but this is what we had the time/budget for as a first iteration of this project.  

Has anyone else noticed/solved these issues?  

I'd post code, but it all is essentially:

// Show the loader.
// Do stuff
// Hide the loader.