資源描述:
《高性能JavaScript》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫(kù)。
1、目錄第一章LoadingandExecution加載和運(yùn)行......2第二章DataAccess數(shù)據(jù)訪問(wèn)...........26第三章DOMScriptingDOM編程..........56第四章AlgorithmsandFlowControl算法和流程控制....104第五章StringsandRegularExpressions字符串和正則表達(dá)式....139第六章ResponsiveInterfaces響應(yīng)接口..............184第七章Ajax異步JavaScript和XML...
2、............216第八章ProgrammingPractices編程實(shí)踐...................261第九章BuildingandDeployingHigh-PerformanceJavaScriptApplications構(gòu)建和部署高性能JavaScript應(yīng)用...279第十章Tools工具................306Downloadatwww.Pin5i.Com第一章LoadingandExecution加載和運(yùn)行JavaScriptperformanceinthe
3、browserisarguablythemostimportantusabilityissuefacingdevelopers.TheproblemiscomplexbecauseoftheblockingnatureofJavaScript,whichistosaythatnothingelsecanhappenwhileJavaScriptcodeisbeingexecuted.Infact,mostbrowsersuseasingleprocessforbothuserinterface(UI)upd
4、atesandJavaScriptexecution,soonlyonecanhappenatanygivenmomentintime.ThelongerJavaScripttakestoexecute,thelongerittakesbeforethebrowserisfreetorespondtouserinput.JavaScript在瀏覽器中的性能,可認(rèn)為是開發(fā)者所要面對(duì)的最重要的可用性問(wèn)題。此問(wèn)題因JavaScript的阻塞特征而復(fù)雜,也就是說(shuō),當(dāng)JavaScript運(yùn)行時(shí)其他的事情不能被瀏覽器處
5、理。事實(shí)上,大多數(shù)瀏覽器使用單進(jìn)程處理UI更新和JavaScript運(yùn)行等多個(gè)任務(wù),而同一時(shí)間只能有一個(gè)任務(wù)被執(zhí)行。JavaScript運(yùn)行了多長(zhǎng)時(shí)間,那么在瀏覽器空閑下來(lái)響應(yīng)用戶輸入之前的等待時(shí)間就有多長(zhǎng)。Onabasiclevel,thismeansthattheverypresenceofa