Javascript ʹÓÃIDE¹¤¾ß½øÐе÷ÊÔ
1. Javascript Debug Toolkit½éÉÜ
JSDT(Javascript Debug Toolkit)ÊÇÒ»¸öÓÃÓÚjavascriptµ÷ÊÔµÄeclipse
²å¼þ£¬ÓÃÓÚµ÷ÊÔjavascript¡£JSDT¿ÉÒÔ¿çä¯ÀÀÆ÷µ÷ÊÔ£¬Ö§³ÖÔÚIE,Firefox,Safari,ChromeµÈÖ÷Á÷ä¯ÀÀÆ÷Öе÷ÊÔ
javascript¡£JSDTÖ§³ÖÉèÖöϵ㣬µ¥²½µ÷ÊԵȵ÷ÊÔ¹¤¾ßµÄ»ù±¾ÌØÐÔ¡£
2. ÈçºÎ°²×°
JSDTÊÇ»ùÓÚeclipse3.2+,jdk1.5+»ù´¡¿ª·¢µÄ£¬Òò´Ë°²×°JSDTÇ°Ó¦µ±ÏÈ°²×°jdk1.5+ºÍeclipse3.2+¡£
JSDTÏÂÔصØÖ·£ºhttp://code.google.com/p/jsdt/downloads/list
,ÆäÖÐjsdt-1.0.0.zipÊÇJSDTµÄ°²×°°ü£¬ÏÂÔØ°ÑÆäÖеÄÈý¸öjar°ü½âѹµ½eclipseµÄpluginsĿ¼Ï£¬ÖØÆôeclipse¼´¿É¡£
jsdt-simple.swfÊÇÒ»¶ÎʹÓÃjsdtÔÚchromeä¯ÀÀÆ÷µ÷ÊÔjavascriptµÄ¼òµ¥Àý×ӵļÏó¡£
jsdt-ext-desktop.swfÊÇÒ»¶ÎʹÓÃjsdtÔÚsafariä¯ÀÀÆ÷µ÷ÊÔjavascriptµÄ¼Ïó¡£
3.ÈçºÎʹÓÃ
1. ÔÚeclipseÖдò¿ªµ÷ÊÔ¶Ô»°¿ò£¬ÈçÏÂͼËùʾ£º
2. н¨Ò»¸öJavascript Debug£¬ÈçÏÂͼËùʾ
ÔÚurlÖÐÊäÈëÒªµ÷ÊÔµÄurl--±¾µØÎļþÃû»ò·þÎñÆ÷ÉϵÄÎļþÃû(Ö»Ö§³ÖhttpÀàÐ͵Äurl)¡£ÔÚbrowserÊäÈë¿òÖÐÑ¡Ôñä¯ÀÀÆ÷(ie,firefox,safari»òchromeµÈ)
µã»÷µ÷ÊÔºó»á´ò¿ªä¯ÀÀÆ÷£¬£¬eclipseÒ²»áתµ½µ÷ÊÔÊÓͼ£¬²¢´ò¿ªËùÓÐÓõ½µÄjavascriptÎļþ¡£
Èç¹ûûÓдò¿ªjavascriptÎļþ£¬Çë²é¿´µ÷ÊÔ͸ÊÓͼÖÐÊÇ·ñ´ò¿ªÁËDebug ScriptsÊÓͼ
Èç¹ûûÓдò¿ª¸ÃÊÓͼ£¬Çëµã»÷£ºwindow-show view-other->Debug Scripts´ò¿ªDebug
ScriptsÊÓͼ£¬ÔÙÑ¡Ôñµ±Ç°µ÷ÊÔ¶ÑÕ»£¬¼´¿É¿´µ½Debug ScriptsÊÓͼ£¬Ë«»÷Debug
ScriptsÖеÄÎļþ£¬¼´¿É´ò¿ªscriptÎļþ¡£
3. ÉèÖöϵã
ÔÚjsÎļþÖпÉÒÔÉèÖöϵã
ä¯ÀÀÆ÷ÖÐÔËÐе½¸ÃÐÐjsʱ»á×Ô¶¯Öжϣ¬eclipseÒ²»áÍ£Ö¹Ôڸöϵ㣬µÈ´ýÓû§²Ù×÷¡£
4. ÆäËû²Ù×÷
ÒòΪÆäËû²Ù×÷ºÍeclipseµ÷ÊÔÊÇÒ»ÑùµÄ£¬ÕâÀï²»Ôٶི¡£
Ïà¹ØÎĵµ£º
Yielding with Timers Óö¨Ê±Æ÷Èóöʱ¼äƬ
Despite your best efforts, there will be times when a JavaScript task cannot be completed in 100 milliseconds or less because of its complexity. In these cases, it's ideal to yield control of the UI thread so that UI updates may occur ......
Data Format Conclusions Êý¾Ý¸ñʽ×ܽá
Favor lightweight formats in general; the best are JSON and a character-delimited custom format. If the data set is large and parse time becomes an issue, use one of these two techniques:
×ܵÄÀ´ËµÔ½ÇáÁ¿¼¶µÄ¸ñʽԽºÃ£¬× ......
µÚ¾ÅÕÂ
Building and Deploying High-Performance JavaScript Applications
´´½¨²¢²¿Êð¸ßÐÔÄÜJavaScriptÓ¦ÓóÌÐò
According to a 2007 study by Yahoo!'s Exceptional Performance team, 40%–60% of Yahoo!'s users have an empty cache experience, and about 20% of all page views are done ......
Fiddler
Fiddler is an HTTP debugging proxy that examines the assets coming over the wire and helps identify any loading bottlenecks. Created by Eric Lawrence, this is a general purpose network analysis tool for Windows that provides detailed reports on any browser or web request. ......
Summary ×ܽá
When web pages or applications begin to feel slow, analyzing assets as they come over the wire and profiling scripts while they are running allows you to focus your optimization efforts where they are needed most.
µ±ÍøÒ³»òÓ¦ÓóÌÐò±äÂýʱ£¬·ÖÎ ......