jquery/jquery-mobile — Issue #2913: General Performance debate
Author: ora726
Created: 2011-11-02 11:21:24+00:00
State: open

Hi all,
Not sure if this is the place for a general Performance debate, so please let me know if I should post this somewhere else.
I have developed my app with jquery mobile and have done most of the testing on my desktop with occasional tests on an iphone 3GS. I did develop on JQM on the premisses that the performance hits I was having where due to the fact that JQM was in Alpha, then Beta, then RC now. While worried by the performances on the Iphone 3GS I got really alarmed 2 weeks ago when for the first time I had an opportunity to run the app on an Android stock device, in this case a Wildfire, which is not the fanciest and fasted device around, but a good representation of the mid performance devices on sale today. The performances where terrible, events would take so much time to fire up that they where missed entirely and the application was simply made useless.
I have no pretense of having written the best and most efficient application and am sure that better programmers could do better than I did, and I understand that you are trying the impossible by covering the widest choice of devices, and I think that the project is doing well, but the performance subject seem to be left for later and I think this strategy could deal a blow to the project and undermine it's credibility.

Please understand that I am really not trying to criticize the efforts being done, they are great and this project came out of nowhere at an incredible speed, but the limitations of the systems used today must be acknowledged and the expectations of programmers that have committed to this project and have many months of work in the balance must be tempered.
I was surprised to see the number of people looking for performance improvements in JQM on sites such as phonegap, Dreamwaver, stackoverflow, I spent considerable time reading trough all this posts and making tests to no avail, the application responsiveness is at best usable on an Iphone 3GS and get to unusable on any inferior hardware even when simply navigating JQM pages without any additional javascript code running in the background.

I think that it is very important for the project to address this concerns now as the consequences of not doing so would be a lack of credibility that could cripple this great project future.

Possible things I would suggest are :
- That a real debate on performances achievable with JQM be started, that benchmarks be published, maybe by allowing all programmers around the world to run a benchmark and feedback program that would list the strong and week points of each devices and filter the acceptable devices from the non acceptable.
- That a web site or blog or something similar be dedicated to performance tuning, optimizations, etc, for example I still don't know if I am better of by dividing my code in multiple HTLM or if my current approach of having all in one (Target is phonegap and not a web site) is best. Most importantly that this optimizations be understandable and implementable by non super techies of Javascript and HTML, I have done a real effort to get into this but I know that I am no where near being able to modify the code of JQM for my purposes.
- That as part of the roadmap the potential performance improvements be included, maybe by listing the minimum device configuration (CPU, memory, graphic capabilities, etc, ...) that the team would feel comfortable to match a preset level of performances.

I read recently that 70% of people in Egypt surf the web trough a mobile device and not a desktop, I can't tell you how this info came by or how accurate it is, but I know that the biggest part of the world is not running the latest HTC or Motorola dual core devices and that it might be a few years before the majority of devices will be able to run JQM in a snappy manner.
Where I am going is that maybe, just maybe the project is hitting real technical limitations and that it might be time to consider alternative technologies to improve the performance levels :
Several ideas come to mind, for example generating from JQM multiple javascript scripts specific to certain devices capabilities (GWT solution), This would not go against the objective of jQuery and jQuery mobile to support the broadest number of devices, but will on the contrary be a way to maybe include even more devices in the mix and simplify problems that today seem incredibly complex to address.

I fully understand that it might be very difficult for the people that have contributed to this project to look back and "swallow" the fact that their best efforts are not paying dividends to the level they where hoping, but this is just the beginning of JQM, the fondamental idea is great, the code that has already been developed is impressive and the level of compatibility achieved is well above users expectations, it is time now to really define the limits of the devices used today and look at ways around this limitations, even if this mean big changes, because nobody today can realistically release a slow web site or application and hope to retain it's customers.