Chromium (Chrome) ã®ã½ã¼ã¹ãèªã
Chromium (Chrome) ã®ã½ã¼ã¹ãèªãã§ã¿ãï¼
ã¾ã Chromium ã®ä½ç½®ã¥ãããããããï¼
Google çºã®ãªã¼ãã³ã½ã¼ã¹ãªãã©ã¦ã¶ã§ãã Chromium ããã£ã¦ï¼Google Chrome ã¯ãããã«ã¹ã¿ã ãã«ããããã®ï¼ã¨ããä½ç½®ä»ããããï¼ã¾ã大å¤æ°ã®äººéã«ã¨ã£ã¦ã¯ï¼Google Chrome ã®ã½ã¼ã¹ãèªããã¨ããèªèã§åé¡ãªããã ããï¼
ã½ã¼ã¹ããã¦ã³ãã¼ããã¦ãã«ãã¾ã§ï¼ã®æé ã¯ããã«ã¾ã¨ã¾ã£ã¦ããï¼
æ¨å¥¨ãã«ãç°å¢ã¯ Visual C++ 2005 SP1ï¼ã½ãªã¥ã¼ã·ã§ã³ãã¡ã¤ã«å梱ãªã®ã§ï¼Windows ã£åãå®å¿ï¼
巨大㪠tar ãã¡ã¤ã«ã®å±éãçµããã¨ï¼Visual C++ã®ããã¸ã§ã¯ããã¡ã¤ã«ã大éã«ç¾ããï¼åããã¸ã§ã¯ãã®æ¦è¦ã¯ãã¡ãï¼
Google ã§ãã£ãã¨æ¸ãããã¨æãããé¨åã®ãã¡ï¼çµæ§ãªå²åã« Win32 è²ãå¼·ãï¼ãã«ãããã»ã¹ã Visual C++ å
ã§å®çµï¼ãªããæ®æ®µãã Visual C++ ã§éçºããã¦ããã¨ããå°è±¡ãåããï¼
ãã¾ãã«ã Win32 ã£ã½ãããã¸ã§ã¯ããªã®ã§ï¼èªç¶ã¨ããã¤ãæ°ã«ãªãåèªãæ¤ç´¢ãã¦ã¿ããï¼ããã¦ä½åãæ¤ç´¢ãã¦ãããã¡ã«ãã°çºè¦ï¼
WM_DWMCOMPOSITIONCHANGED ãæ¤ç´¢ãã¦ã¿ãã¨ããï¼ä¸ç®æãããã¯ãããã®ã®ï¼ã¾ã¨ãã«ãã³ãã«ããã¦ããªãï¼Chromium (Chrome) ããã¯ï¼ã¢ããªã±ã¼ã·ã§ã³èµ·åæã«ãã¹ã¯ãããã³ã³ãã¸ã·ã§ã³ã®æå¹ã»ç¡å¹ã確èªãããã®ã®ï¼ãã®å¾ã«ãã¹ã¯ãããã³ã³ãã¸ã·ã§ã³ãç¡å¹åããããå
ã«æ»ã£ããã¨ããã±ã¼ã¹ãæ³å®ãã¦ããªãããã ï¼å®éï¼DWM ãç¡å¹ã«ããç¶æ
㧠Google Chrome ãèµ·åãï¼ãã®å¾ã§ DWM ãæå¹åãã¦ã¿ãã¨ããåãããã¨ã«ãªã£ãï¼
ã¨ã¾ããããªæãã§ï¼Win32 éçºçµé¨ã®ãã人ã«ã¨ã£ã¦ã¯æ®éã«é¢ç½ãã½ã¼ã¹ã ããï¼IMM32 å¨ãã®ã³ã¼ããçµæ§ãã£ã¦ï¼ã³ã¡ã³ããèªãã§ããã¨ãã®è¦å´ã«æ³£ãã¦ããï¼
ãã®æã®äººã«ã¯ããããï¼
(追è¨) Chromium (Chrome) ã®ã¿ã¤ã精度
ããããè¨äºãè¦ã¤ããï¼
ããã§èå³æ·±ããã¨ãä¸ç¹ãJavaScriptã®Timerã¯1/1000ç§ããªãã¡msecã®ç²¾åº¦ã§ãã¿ã¤ãã¼ãåãããã¨ãã§ãã¾ããããªãã¡setInterval("test", 1)ã®ããã«ã¿ã¤ãã¼ãçºåãããã¨ã1msecæ¯ã«testã¨ããé¢æ°ãå¼ã³åºããã¨ãã§ãã¾ãããã ãå®éã«ã¯ããã®Timerã®ç²¾åº¦ã¯ãJavaScriptã®ã¨ã³ã¸ã³ã®å®è£ ã«ä¾åãã¦ãã¦ãä¸è¬çã«ã¿ã¤ãã¼ã®æå°ç²¾åº¦ã¯10~16msecç¨åº¦ã«ãªã£ã¦ããã®ãéä¾ã§ããã16msecã¨ããã¨ãç´1/60ç§ãªã®ã§ãã¢ãã¡ã¼ã·ã§ã³ããã¨ãã«ããã®ç¨åº¦ã®ç²¾åº¦ãããã°ååã ããæªæã®ããJavaScriptã®æ´èµ°ãæ¢ããæå³ã§ã16msecãããã«çãã¦ããã®ãä¸è¬çã ã¨ããã®ãå¾æ¥ã®ãã©ã¦ã¶ã®å¸¸è(?)ã ã¨åæã«è§£éãã¦ãã®ã§ãããChromeã®ã¿ã¤ãã¼ç²¾åº¦ã¯1msecã§åãã¾ãããªã®ã§ãsetIntervalã§1msecãæå®ããããã©ã¼ãã³ã¹æ¸¬å®ãããã¨ããã³ããæ§è½ãä¸ããã¾ãã(ä»ã®ãã©ã¦ã¶ã§ã¯1msecæå®ãã¦ãå®éã«ã¯10~16msecæ¯ã«ããåããªãã®ã§)
Web å±ããã«ã¯ï¼JavaScriptã¨ã³ã¸ã³ã®ã¿ã¤ã精度ãä½ãã¨æ°ã«ãªãã¨ãããããï¼ããããã® 10ã16msec ã¨ããééï¼Windowsã£åçã«ã¯åãªããã¼ãã¦ã§ã¢ã¿ã¤ãã®ããã©ã«ãã®å²ãè¾¼ã¿ééã ã£ããããï¼
ãã§ï¼1msec ã§åãã¨ãã Chrome (Chromium) ããã®ã½ã¼ã¹ã³ã¼ãããï¼timeBeginPeriod ãæ¤ç´¢ãã¦ã¿ãã¨ããï¼timeBeginPeriod(1); ã 3 ç®æã»ã©ã¿ã¤ãã£ãï¼ãã¯ãã¨ããããªãã¨ãããï¼
ãã¡ãã 1msec ééã§ã¿ã¤ããåããã«ããã£ã¦ä»ã«ã注æãã¹ãäºã¯ããï¼ãããï¼éçºè
ã OS ç¹æ§ãçç¥ãã¦ãã¦ï¼ãããã¹ãå ´æã§ãããã¹ã API ãå¼ãã§ãããã©ããã ãã§æ±ºã¾ã£ã¦ããåé¡ãï¼å¤éããã¯ãä¸ã®äººã«ã¯æ·±ããèãããã£ã¦ã®ãã¨ãã¨æ·±èªã¿ããã¦ãããã¨ãçµæ§ããããããªããã¨æ·±èªã¿ããä»æ¥ãã®é ï¼
(追è¨2) Chromium (Chrome) ã®ã¿ã¤ã精度 (2)
ãã£ãæ¸ããã¿ã¤ã精度ã®è©±ï¼æ¶è²»é»åã¨ããç¹ã§ã¯ç¢ºãã«ãä¸ã®äººã«ã¯æ·±ããèãããã£ã¦ã®ãã¨ã説ã¯ããããï¼ããã¯ããã£ã¨ãï¼
ãã¦ãJavaScriptã®ã¿ã¤ãã¼ã«ã¯ãæ¬å½ã«1msã®ç²¾åº¦ãå¿ è¦ã ããããFlashã§ãããFlash Player 10ã§ãtimeBeginPeriodã®ä½¿ç¨ããããã¨ããã®ã«ãã¾ãããã¯ãçé»åã®ã»ããVistaã§ã¯ãªã¼ãã£ãªã¹ã¿ãã¯ãéãã¨ããçç±ãããã®ã ããã©ãMSãIntelããçé»åã®å¼·ãå§åãããã£ã¦ããã®ã ããããã¯ãçé»åã ããã
Windows ã«ãã¦ã Linux ã«ãã¦ãï¼ã¿ã¤ã ã·ã§ã¢ãªã³ã°ã®æ ¹æ¬çãªã¨ããã§ï¼ãã¼ãã¦ã§ã¢ã¿ã¤ãã§ãã Programmable Interval Timer (PIT) ã«ä¾åãã¦ãã*1ï¼PIT ã¯ã²ã¨ã¤ãããªãããï¼ããã¤ã®å²ãè¾¼ã¿ééãå¤ããã¨ã¹ã¬ããã¹ã±ã¸ã¥ã¼ã©ã®åä½ãã¾ãã§å¤ãã£ã¦ãã¾ãï¼çµæçã«å ¨ããã»ã¹ãå½±é¿ãåããï¼timeBeginPeriod(1); ãè¡ã£ã¦ãããã¨ã¯ï¼ã¤ã¾ãã¯ãããããã¨ã ï¼æ¶è²»é»åçã«ããã¯ã©ããï¼ ã¨ãã声ã¯æ ¹å¼·ãï¼ä¸»ã«çãä¸ãã£ã¦ããã®ã¯ãé£ Linux ã®æ¹ã ãã©ï¼
- 割り込み頻度変更で消費電力は低下するか? - Linux Kernel Watch
- Dynamic Tick Timer
- Linux ã®ãã¼ãã¦ã§ã¢ã¿ã¤ãã¼ã®è©± - NyaRuRuã®æ¥è¨
Windows ã§ã¯ã©ããã¨ããã¨ï¼6 å¹´åã«æ¸ããããGuidelines For Providing Multimedia Timer Supportãã® Reasons for a New Timer ã§æ¢ã«åé¡ãææããã¦ããã«ãé¢ãããï¼HPET ã®æ®åå
·åã¨ãæ° API ãã©ããããã¨ãï¼ãªããªã解決ã®å½¢ãè¦ãã¦ããªãï¼
ããããã£ã¦ä»ã®æã
ã«ã¯ Win32 API ããèªç±åº¦ã¯ãªãããã ãï¼ãã¾ãè½ã¨ãã©ãããè¦ã¤ããããã¨ããã ãã§ããªã大ããªææã«ãªãï¼æ¶è²»é»åè¾¼ã¿ã®ãã³ããã¼ã¯ãåã£ã¦ã¿ãçï¼Chromium ã¯ããå®é¨ææã«ãªãã ããï¼æããã«æä½ãã¦ãªããããªæ㯠timeBeginPeriod ã®å²ãè¾¼ã¿ééãå
ã«æ»ãã¨ãã£ã誰ã§ãæãä»ãæ¹æ³ã§ãï¼æ¡å¤ååãªå¹æããããããããªãï¼
Chrome ã®ããªãèããã«ï¼about:timer ã¿ãããªã¢ãã¿ãã¼ã«ãä½ãã®ãé¢ç½ããã ï¼ãããããã®åé¡ãç¥ããã¦ããªãããã¨ããã®ããããï¼ããã§ãã©ã¦ã¶ãéãã¦åé¡æèµ·ã¨ããã®ã Chrome ã®ç«ã¡ä½ç½®ã«ã¯ç¸å¿ãããããããªãï¼