Performance: replace several jqmData() function calls with getAttribute() to improve performance. It is the same as #5466. #5732

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

Changsuk commented Mar 5, 2013

Hi, All.

I saw that #5466 PR was closed by @gabrielschulhof a few days ago. Thanks so much Gabriel. :)
And there are many lines using jqmData() so my team rechecked them what lines could be changed with get/setAttribute. As a result, the committed codes are the same as #5466.

But some other jqmData method calls return true or false value, so my team thought that it would be better to make a new function including get/setAttribute to handle that case.
@gabrielschulhof, you made getAttrFixed() on buttonMarkup.js, so what do you think that we will define getAttrFixed() in global area and use it in other places? If you agree with my idea, we can upgrade more codes to improve performance.

  • 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.

Contributor

gabrielschulhof commented Mar 5, 2013

My first thought is $.mobile._getAttrFixed() to make sure it's not exposed.

Contributor

Changsuk commented Mar 6, 2013

@gabrielschulhof Thanks a lot. So can I make "$.mobile._getAttrFixed()" method in global area? or could you make it?

Owner

arschmitz commented Aug 6, 2013

Closing this PR sense it has been implemented

@arschmitz arschmitz closed this Aug 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment