Created
March 25, 2012 13:23
-
-
Save cballou/2193754 to your computer and use it in GitHub Desktop.
Optimizing (and Debugging) Javascript With Firebug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.time(); | |
| var str = ''; | |
| for (var i = 0; i < 1000; i++) { | |
| str += i; | |
| } | |
| console.timeEnd(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.profile(); | |
| for (var i = 0; i < 1000; i++) { | |
| testFunction(); | |
| } | |
| console.profileEnd(); | |
| function testFunction() { | |
| // dummy function | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.trace(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment