Speed improvement for phonegap