菜单
  

    only really scratches the surface of what the timeline can do.
    Rather than just showing the amount of time the function takes, it also splits it into loading, scripting, rendering,
    and painting. These are extremely useful for knowing why a function is taking longer than it should. The loading
    category is where any XHR (AJAX) calls are made as well as parsing the HTML. The logic within the function is
    included in the scripting category. Rendering is where the DOM manipulation takes place, primarily recalculating
    styles and layout. Paint is where the browser updates what is being shown to match the outcome of the rendering,
    including any changes on canvas and other elements that are not directly DOM related.
    In Chapter 2, we use canvas for a simulation of birds flocking (known as Boids) and so I have recorded that using
    the timeline to show you how it works. Figure 1-2 shows the events timeline, useful for timing functions and visually
    seeing the stack that they produce. There are only two different colors shown in the screenshots. This is because there
    are very few DOM elements due to using a canvas and so there is no loading and rendering required. The lack of DOM
    is also the same reason for the patterns within the timeline, if we were recording performance of a regular website,
    then we might see changes on scrolling or hovering over a button; so the timeline is definitely powerful for more than
    canvas animations! Figure 1-3 shows the frames timeline. This measures the Frames Per Second (FPS) of the page
    because a low FPS can make a site or animation look ”janky” instead of the smooth experience that people expect.
    The third screenshot of this section, Figure 1-4, shows the memory timeline; you can see from the spikes that the
    memory stores more and more until the garbage collector comes along and clears the memory that is storing old data.
    You will notice that there is quite a lot of whitespace below the timeline. This space is for a graph showing the amount
    of DOM nodes and event handlers (as you can see in Figure 1-5, which shows the timeline for a basic portfolio website
    I once made).
    B.原文的翻译JavaScript的创造力JavaScript控制台
    每个浏览器都有不同的开发工具,有些是相似的,有些完全不同但有相似性,所有的浏览器已经是JavaScript控制台。这是其中记录所有的错误,但它往往比更强大只是一个错误日志。我将讨论它从谷歌浏览器的观点,但大多数的浏览器有非常相似的命令。论文网
    访问变量
    通常你会想知道一个变量的值,这样就可以验证它是你所期望的,甚至只是学习什么数据如何被构造(特别是对象)。要做到这一点,只需键入变量的名字进入的JavaScript
    控制台和值将是名称下面的输出,这适用于所有类型,包括对象和数组。有一个一些方法通过控制台访问变量:
    代码后r个•UN - 如果你只关心最后的结局,只是做我解释
    上面并键入变量名。
    •断点 - 我将详细不久,但在许多讨论调试器断点
    其它语言,你可以添加一个断点,允许你检查在变量被执行在断点代码中的点。
    •调试报告 - 您可以手动在你的代码写入调试器添加断点;在你的代码。它通常是更容易使用断点,但值得了解的调试器声明。
    •里面的代码 - 您可以从代码中登录到控制台。它通常是更容易使用
    断点,但如果你希望你可以写的console.log('富')登录;内的代码。
    •作为表 - 这是目前仅在谷歌Chrome和Firebug的使用,但它是一个非常有用的方法来查看数组作为表格数据,其中每个指标一行。通过运行console.table(阵列);从任内的代码或控制台内(我想从控制台直建议,断点期间,因为它是不兼容其他浏览器)。
  1. 上一篇:ASP.NET技术英文文献和中文翻译
  2. 下一篇:MVC设计模式和Spring,Struts框架英文文献和中文翻译
  1. 汽车内燃机连杆载荷和应...

  2. 审计的优化管理英文文献和中文翻译

  3. FPGA的全景拼接相机的优化...

  4. 气味源定位的有限时间粒...

  5. PLC仿真的虚拟工厂英文文献和中文翻译

  6. ZigBee-RFID混合网络的节电英文文献和中文翻译

  7. PLC可编程控制器的介绍英文文献和中文翻译

  8. 高警觉工作人群的元情绪...

  9. g-C3N4光催化剂的制备和光催化性能研究

  10. NFC协议物理层的软件实现+文献综述

  11. 上市公司股权结构对经营绩效的影响研究

  12. 现代简约美式风格在室内家装中的运用

  13. 江苏省某高中学生体质现状的调查研究

  14. 浅析中国古代宗法制度

  15. 巴金《激流三部曲》高觉新的悲剧命运

  16. 中国传统元素在游戏角色...

  17. C++最短路径算法研究和程序设计

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回