计算机技术
文章平均质量分 91
situdesign
这个作者很懒,什么都没留下…
展开
-
[翻译]High Performance JavaScript(001)
第一章 Loading and Execution 加载和运行 JavaScript performance in the browser is arguably the most important usability issue facing developers. The problem is complex because of the blocking nature翻译 2010-05-15 10:30:00 · 990 阅读 · 0 评论 -
[翻译]High Performance JavaScript(021)
Splitting Up Tasks 分解任务 What we typically think of as one task can often be broken down into a series of subtasks. If a single function is taking too long to execute, check to see whether it翻译 2010-05-31 10:04:00 · 788 阅读 · 0 评论 -
[翻译]High Performance JavaScript(031)
<br />Firebug<br /> <br /> Firefox is a popular browser with developers, partially due to the Firebug addon (available at http://www.getfirebug.com/), which was developed initially by Joe Hewitt and is now maintained by the Mozilla Foundation. This tool翻译 2010-05-31 10:56:00 · 1020 阅读 · 0 评论 -
[翻译]High Performance JavaScript(033)
<br />Summary 总结<br /> <br /><br /> 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.翻译 2010-05-31 11:01:00 · 673 阅读 · 0 评论 -
[翻译]High Performance JavaScript(011)
Repaints and Reflows 重绘和重排版 Once the browser has downloaded all the components of a page—HTML markup, JavaScript, CSS, images—it parses through the files and creates two internal data structu翻译 2010-05-31 09:39:00 · 920 阅读 · 0 评论 -
[翻译]High Performance JavaScript(014)
Recursion Patterns 递归模式 When you run into a call stack size limit, your first step should be to identify any instances of recursion in the code. To that end, there are two recursive patterns翻译 2010-05-31 09:48:00 · 506 阅读 · 0 评论 -
[翻译]High Performance JavaScript(030)
第十章 Tools 工具 Having the right software is essential for identifying bottlenecks in both the loading and running of scripts. A number of browser vendors and large-scale websites have shared t翻译 2010-05-31 10:41:00 · 626 阅读 · 0 评论 -
[翻译]High Performance JavaScript(032)
<br />Fiddler<br /> <br /> 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 d翻译 2010-05-31 11:00:00 · 841 阅读 · 0 评论 -
[翻译]High Performance JavaScript(007)
Dynamic Scopes 动态作用域 Both the with statement and the catch clause of a try-catch statement, as well as a function containing eval_r(), are all considered to be dynamic scopes. A dynamic scope翻译 2010-05-28 18:07:00 · 534 阅读 · 0 评论 -
[翻译]High Performance JavaScript(012)
第四章 Algorithms and Flow Control 算法和流程控制 The overall structure of your code is one of the main determinants as to how fast it will execute. Having a very small amount of code doesnt necessar翻译 2010-05-31 09:41:00 · 633 阅读 · 0 评论 -
[翻译]High Performance JavaScript(013)
Conditionals 条件表达式 Similar in nature to loops, conditionals determine how execution flows through JavaScript. The traditional argument of whether to use if-else statements or a switch stateme翻译 2010-05-31 09:44:00 · 1080 阅读 · 0 评论 -
[翻译]High Performance JavaScript(018)
String Trimming 字符串修剪 Removing leading and trailing whitespace from a string is a simple but common task. Although ECMAScript 5 adds a native string trim method (and you should therefore star翻译 2010-05-31 09:57:00 · 427 阅读 · 0 评论 -
[翻译]High Performance JavaScript(022)
第七章 Ajax 异步JavaScript和XML Ajax is a cornerstone of high-performance JavaScript. It can be used to make a page load faster by delaying the download of large resources. It can prevent page loa翻译 2010-05-31 10:06:00 · 539 阅读 · 0 评论 -
[翻译]High Performance JavaScript(025)
第八章 Programming Practices 编程实践 Every programming language has pain points and inefficient patterns that develop over time. The appearance of these traits occurs as people migrate to the lang翻译 2010-05-31 10:18:00 · 490 阅读 · 0 评论 -
[翻译]High Performance JavaScript(028)
JavaScript Minification JavaScript紧凑 JavaScript minification is the process by which a JavaScript file is stripped of everything that does not contribute to its execution. This includes comme翻译 2010-05-31 10:30:00 · 618 阅读 · 0 评论 -
[翻译]High Performance JavaScript(019)
第六章 Responsive Interfaces 响应接口 Theres nothing more frustrating than clicking something on a web page and having nothing happen. This problem goes back to the origin of transactional web app翻译 2010-05-31 09:59:00 · 645 阅读 · 0 评论 -
[翻译]High Performance JavaScript(010)
Cloning Nodes 节点克隆 Another way of updating page contents using DOM methods is to clone existing DOM elements instead of creating new ones—in other words, using element.cloneNode() (where elem翻译 2010-05-28 18:16:00 · 912 阅读 · 1 评论 -
[翻译]High Performance JavaScript(027)
第九章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翻译 2010-05-31 10:28:00 · 611 阅读 · 0 评论 -
[翻译]High Performance JavaScript(004)
XMLHttpRequest Script Injection XHR脚本注入 Another approach to nonblocking scripts is to retrieve the JavaScript code using an XMLHttpRequest (XHR) object and then inject the script into the pag翻译 2010-05-15 11:01:00 · 556 阅读 · 0 评论 -
[翻译]High Performance JavaScript(002)
Grouping Scripts 成组脚本 Since each tag blocks the page from rendering during initial download, its helpful to limit the total number of tags contained in the page. This applies to both inline sc翻译 2010-05-15 10:38:00 · 504 阅读 · 0 评论 -
[翻译]High Performance JavaScript(003)
Dynamic Script Elements 动态脚本元素 The Document Object Model (DOM) allows you to dynamically create almost any part of an HTML document using JavaScript. At its root, the element isnt any diffe翻译 2010-05-15 10:52:00 · 498 阅读 · 0 评论 -
[翻译]High Performance JavaScript(005)
第二章 Data Access 数据访问 One of the classic computer science problems is determining where data should be stored for optimal reading and writing. Where data is stored is related to how quickly it c翻译 2010-05-15 11:06:00 · 561 阅读 · 0 评论 -
[翻译]High Performance JavaScript(006)
Identifier Resolution Performance 标识符识别性能 Identifier resolution isnt free, as in fact no computer operation really is without some sort of performance overhead. The deeper into the execution翻译 2010-05-28 17:54:00 · 519 阅读 · 0 评论 -
[翻译]High Performance JavaScript(008)
Nested Members 嵌套成员 Since object members may contain other members, its not uncommon to see patterns such as window.location.href in JavaScript code. These nested members cause the JavaScrip翻译 2010-05-28 18:09:00 · 339 阅读 · 0 评论 -
[翻译]High Performance JavaScript(009)
第三章 DOM Scripting DOM编程 DOM scripting is expensive, and its a common performance bottleneck in rich web applications. This chapter discusses the areas of DOM scripting that can have a negat翻译 2010-05-28 18:12:00 · 424 阅读 · 0 评论 -
[翻译]High Performance JavaScript(015)
第五章 Strings and Regular Expressions 字符串和正则表达式 Practically all JavaScript programs are intimately tied to strings. For example, many applications use Ajax to fetch strings from a server, conv翻译 2010-05-31 09:51:00 · 686 阅读 · 0 评论 -
[翻译]High Performance JavaScript(016)
Regular Expression Optimization 正则表达式优化 Incautiously crafted regexes can be a major performance bottleneck (the upcoming section, "Runaway Backtracking" on page 91, contains several examples翻译 2010-05-31 09:53:00 · 581 阅读 · 0 评论 -
[翻译]High Performance JavaScript(017)
A Note on Benchmarking 测试基准说明 Because a regexs performance can be wildly different depending on the text its applied to, theres no straightforward way to benchmark regexes against each oth翻译 2010-05-31 09:55:00 · 671 阅读 · 0 评论 -
[翻译]High Performance JavaScript(020)
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,翻译 2010-05-31 10:03:00 · 542 阅读 · 0 评论 -
[翻译]High Performance JavaScript(023)
Data Formats 数据格式 When considering data transmission techniques, you must take into account several factors: feature set, compatibility, performance, and direction (to or from the server). When翻译 2010-05-31 10:13:00 · 719 阅读 · 0 评论 -
[翻译]High Performance JavaScript(024)
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 o翻译 2010-05-31 10:15:00 · 616 阅读 · 0 评论 -
[翻译]High Performance JavaScript(026)
Use the Fast Parts 使用速度快的部分 Even though JavaScript is often blamed for being slow, there are parts of the language that are incredibly fast. This should come as no surprise, since JavaScript翻译 2010-05-31 10:24:00 · 535 阅读 · 0 评论 -
[翻译]High Performance JavaScript(029)
Working Around Caching Issues 关于缓存问题 Adequate cache control can really enhance the user experience, but it has a downside: when revving up your application, you want to make sure your users g翻译 2010-05-31 10:37:00 · 647 阅读 · 0 评论