jquery/jquery-mobile — pull request #5466 by Changsuk (2013-01-17 05:41:17+00:00)
Title: Performance: replace several jqmData() function calls with getAttribute() to improve performance.

Hi, All.
Actually, I tired doing a PR last week but I couldn't because there was many issues on Tizen project, so I'm sorry that I couldn't have enough time to do it. I'm opening the third PR regarding performance improvement now.

My team found another performance issue about using jqmData() function.
As you know, jqmData() calls jQuery data() function. "data()" function is complicated and not small. Also it takes time to call the function because many cases call jQuery.extend() function in data() and extend() calls other functions and has for loop and does a lot of things.

My team found several points in which getAttribute() JavaScript(JS) function can be used. As you can see my commit codes, the codes changed with
getAttribute() JS function call data() and then extend().

After my team replaced three jqmData() function calls with getAttribute() and checked Web App.'s launching time, we got a big performance improvement
and average launching time decreased to 130ms on GalaxyS2 class devices.
Hence, my team has been looking for othor codes to replace jqmData() function call. If my team find other codes, I'll do a PR again.

Additionally, some codes using jqmData() return number or boolean value, hence some of committed codes on jquery.mobile.buttonMarkup.js are modified
according to the return value's type.

Tests : The code has been tested on several jQM widgets using qunit.js.
Modified code is followed the jQuery Core Style guide.
Scope : Performance improvement.

If there are any problems or mistakes on that PR, please let me know. Thanks in advance.