Jonathan
Jonathan

Reputation: 6732

jQuery Mobile very slow on iPad

I'm developing a web application using jQuery Mobile on the client side and PHP & MySQL on the server side. The application works great on desktop browsers like Safari, Chrome and Firefox. However, on the iPad - where the application is opened as a web clip from the home screen - the application performs much worse. Scrolling works fine, but tapping a link to load a page from the server goes very slow.

A recording of the iPad's screen shows that (for example) after tapping it takes 0,3 seconds before the tapped element is highlighted and the loader is shown. After 1,0 second from the start the lower half of the opened page is rendered/shown (below the loader). It then takes another 0,6 seconds before the upper part of the page is shown, making the total time required to load the page 1,6 seconds. A video showing this process (played at 25% of the original speed) can be found here.

Loading process

I understand that loading a page (over WiFi) takes some time, but I do not understand why rendering the upper half of the page takes an extra 0,6 seconds. Assuming that the page is fully loaded after 1,0 second (because the lower half of the page is already shown then), I think that takes pretty much time as well, because it only takes around 0,5 seconds on Safari on my Mac. But that might be caused my the slower processor in the iPad and the lag of the WiFi connection.

Hopefully someone knows some (client side) optimisations to make the application perform (or feel) faster. I already disabled animations within jQuery Mobile and I will try to optimise the server side myself.


Maybe these things are important to know:

Well, that are all 'special' things I can think of. If you need to know more or see some source code, please let me know.

Upvotes: 5

Views: 3289

Answers (2)

Jonathan
Jonathan

Reputation: 6732

The problem was (mostly) fixed by updating to jQuery Mobile 1.1. That version included some performance related fixes/optimisations.

Upvotes: 2

Nirmal Patel
Nirmal Patel

Reputation: 5168

long listviews are extremely slow... if you are populating a list in pagebefore/show; try adding smaller number of lis initially and append the remaining after a small timeout.

Upvotes: 2

Related Questions