R
Remy Sharp
Hi there,
I've written a time library to profile functions using JavaScript
without being too intrusive.
It works in all the major browsers, IE6+, Firefox, Opera and Safari.
You can hook any function and anonymous function using:
time.func(myFunction);
myFunction(var1, var2, var3);
or
document.getElementById('link').onclick = time.func(function() {
// do something
return value;
});
Examples of profiling can be seen here:
http://remysharp.com/2007/04/20/performance-profiling-javascript/
Hopefully this is of some help - I found it really useful when trying
to profile why my web app was much slower in IE6 (aside from the slow
JS engine!).
If you have any comments, suggestions or bugs please drop me a comment
on the above URL.
Thanks,
Remy.
I've written a time library to profile functions using JavaScript
without being too intrusive.
It works in all the major browsers, IE6+, Firefox, Opera and Safari.
You can hook any function and anonymous function using:
time.func(myFunction);
myFunction(var1, var2, var3);
or
document.getElementById('link').onclick = time.func(function() {
// do something
return value;
});
Examples of profiling can be seen here:
http://remysharp.com/2007/04/20/performance-profiling-javascript/
Hopefully this is of some help - I found it really useful when trying
to profile why my web app was much slower in IE6 (aside from the slow
JS engine!).
If you have any comments, suggestions or bugs please drop me a comment
on the above URL.
Thanks,
Remy.