Recently, I am trying my best to sort out the document of “High Performance JavaScript” and learn it again. I put it here for everyone to check and find the knowledge points they need.
High-performance JavaScript
Chapter 1: Loading and Execution
- Script location
- Block scripts
-
Non-blocking scripts
- Delayed script
- Dynamic script element
-
XMLHTTPRequest
Script injection - Recommended non-blocking mode
- Summary
Chapter 2: Data Access
-
Administrative scope
- Scope chain and Identifier Analysis
- Performance of Identifier Resolution
- Change scope chain
- Dynamic scope
- Closure, Scope, and Memory
-
Object member
- Prototype
- Prototype chain
- Nested members
- Caching Object Member Values
Chapter 3: DOM Programming
-
DOM in browser
- Born slow
-
DOM access and modification
-
innerHTML
Contrast DOM method - Node clone
- HTML collection
- Traversal DOM
-
-
Redrawing and Rearrangement
- When will the rearrangement take place
- Queue and Refresh of Render Tree Changes
- Minimize redrawing and rearrangement
- Cache layout information
- Detach an element from the animation stream
- IE and
:hover
- Event delegation
- Summary
Chapter 4: Algorithms and Process Control
-
Cycle
- Loop type
- Cyclic performance
- Function-based Iteration
-
conditional statement
-
if-else
Contrastswitch
- Optimization
if-else
- Lookup table
-
-
recursive
- Call stack limit
- Recursive mode
- Iteration
Memoizaton
- Summary
Chapter 5: Strings and Regular Expressions
-
concatenation of string
- Add
+
And add, etc+=
Operator - Array item merge
String.prototype.concat
- Add
-
Regular expression optimization
- How Regular Expressions Work
- Understanding backtracking
- Back out of control
- Description of benchmark test
- More Methods to Improve the Efficiency of Regular Expressions
- When to Use Regular Expressions
-
Remove the leading and trailing blanks of the string
- Use regular expressions to remove the beginning and end whitespace
- Do not use regular expressions to remove the leading and trailing blanks
- Hybrid solution
- Summary
Chapter 6: Quick Response User Interface
-
Browser UI thread
- Browser restrictions
- How long is too long
-
Use the timer to release the time segment
- Timer basis
- Timer accuracy
- Use timers to process arrays
- Split task
- Timers and Performance
-
Web Workers
- Worder operating environment
- Communicate with Worker
- Load external files
- Practical application
Chapter 7: Ajax
-
Data transmission
- Request data
- txd
-
data format
- XML
- JSON
- HTML
- Custom format
- Data format summary
-
Ajax performance guide
- Cache data
- Understanding the Limitations of Ajax Class Libraries
- Summary
Chapter 8: Programming Practice
- Avoid double evaluation
- Use
Object/Array
Direct quantity -
Avoid duplication of work
- Delayed loading
- Conditional preload
-
The fast part
- bit manipulation
- native
- Summary
Chapter 9: Building and Deploying High Performance JavaScript Applications
Apache Ant
- Merge multiple JS files
- Pre-processing JS files
- JS compression
- Comparison of build-time processing and run-time processing
- HTTP compression of JS
- Caching JS files
- Handle cache issues
- Use a Content Delivery Network (CDN)
- Deploy JS resources
- Agile JS building process
- Summary
Chapter 10: Tools
- JS performance analysis
- YUI Profiler
- Anonymous function
-
Firebug
- Console panel analysis tool
- Console API
- Network panel
- IE developer tools
-
Safari Web inspector
- Analysis panel
- Resource panel
- Chrome developer tools
- Script blocking
- Page Speed
- Fiddler
- YSlow
- dynaTrace Ajax Edition
- Summary