Im building an application using phonegap and jquery mobile, and I want to optimize my code. I read a place that javascript is faster than jquery, would it have a large impact if I replace my jquery code with javascript? (Im using both now). I also read that I should compress my code, but phonegap say that they compress everything when building, so how necessary is this really?
I read that -webkit-transform: translate3d(0,0,0); speeds up the performance, should I only use this where I have animations? And will this also be beneficial for applications on device (not web applications)?
I also removed the click delay and moved my scripts to the end of my html page. Any other things I have missed?
UPDATE
Another question regarding the css. Im using gradient on my buttons, and after what I read, this can slow the performance. Below is an example of one of my buttons, and my question is if I need all of those attributes for android and iphone on a mobile application
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #CEEDF5;
*background-color: #CEEDF5;
background-image: -moz-linear-gradient(top, #F7FBFC, #CEEDF5);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#F7FBFC), to(#CEEDF5));
background-image: -webkit-linear-gradient(top, #F7FBFC, #CEEDF5);
background-image: -o-linear-gradient(top, #F7FBFC, #CEEDF5);
background-image: linear-gradient(to bottom, #F7FBFC, #CEEDF5);
background-repeat: repeat-x;
border-color: #CEEDF5;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F7FBFC', endColorstr='#CEEDF5', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
Update 2.0 I got some nasty appending in jquery, and as it was pointed out javascript is about 80% faster! I got no idea how to append in javascript, so I wondering if I could get some help. Here is a common line I usually append.
$('#yourTurnList').append('<li data-rel="close" data-icon="false" data-shadow="false" data-wrapperels="div" class="ui-btn liGame" ><img src="'+picURL+'" name="'+opponent+'" class=" circular3 opponentProfile" /> <div id="'+opponent+'" style="text-align:center; width:60%; height:100%;" class="yourTurnBtn gameList" name="'+round+'" value="'+coinEarned+'"> <h3 class=" gameListName" >'+opponent+'</h3> <br></br><p class=" gameListOther">Your turn - Get Soundy!</p><p class=" gameListRound">Round: '+round+'</p></div><div id="'+imgId+'"><img class="addFriend gameImgRight" name="'+opponent+'" src="cssScript/images/addFriend.png"/></div></li>');