ye9rbw
Last Updated: February 25, 2016
·
955
· euantor
Irnhmv6

Compiling JS closures to enhance load times

Closures are wonderful things for developers - they make life so much easier. They're used all over the place in JavaScript frameworks such as jQuery. Te thing is though, they're just not as efficient as they could be. They can lead to memory leaks when used incorrectly and memory cannot be garbage collected while they are active.

In steps Google's Closure Tools.

The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.

Say Thanks
Respond

1 Response
Add your response

2469
D42a7264714dee5006b9c99d2567a320

How does it compare with UglifyJS and YUI compressor?

over 1 year ago ·