sitelink1 | http://blog.dynatrace.com/2010/03/23/gar...ing-sizes/ |
---|---|
sitelink2 | http://www.sitepen.com/blog/2008/06/09/s...-explorer/ |
sitelink3 | |
sitelink4 | http://www.sitepen.com/blog/2008/05/09/s...-analysis/ |
extra_vars4 | |
extra_vars5 | |
extra_vars6 |
Conclusion :
the performance of the “+=” operator was actually better in Internet Explorer 7 than pushing fragments into an array and joining them.
<IE7에서 문자열 조작은 Array 방식보다 "+=" 연산자가 효율이 더 좋다>
Sample :
foreach(xmlElement in allXmlElements) { var jsonObject = {}; jsonObject["firstName"] = xmlElement.getValueOf("firstName"); jsonObject["lastName"] = xmlElement.getValueOf("lastName"); ... processObject(jsonObject) }
And the pseudo code for JSON:
var allJsonObjects = eval(jsonObjectsAsString); foreach(jsonObject in allJsonObjects) { processObject(jsonObject); }
processObject itself is simply concatenating the individual properties of the JSON Object to a global string variable:
globalString += jsonObject.firstName + " " + jsonObject.lastName + ...