Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 531395 - APIs for tracking JavaScript compilation
: APIs for tracking JavaScript compilation
Status: NEW
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows Vista
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2009-11-27 07:21 PST by Jan Honza Odvarko [:Honza]
Modified: 2014-09-19 00:11 PDT (History)
11 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Jan Honza Odvarko [:Honza] 2009-11-27 07:21:08 PST
It would be incredibly useful to have some APIs that allow tracking Javascript compilation activity and effectively profile web-app performance.

The idea is to have events fired with start/stop for the JS compilation with reference to a script that is being compiled (jsdIScript). The reference would help to link the timings info with proper source-code in the UI (e.g. in Firebug).

Comment 1 Jan Honza Odvarko [:Honza] 2009-11-27 07:34:46 PST
Forgot to note that time stamp should be also passed with the event. Just like in case of nsIActivityObserver interface. Getting the time in JS handler could be too late.

Comment 2 John J. Barton 2009-12-12 10:27:47 PST
See also Bug 449464
Comment 3 Rob Campbell [:rc] (:robcee) 2009-12-12 12:49:58 PST
cc'ing bz, though I suspect dmandelin would be a good candidate for this work. I am not sure this should belong in jsd.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2009-12-12 13:58:40 PST
This should probably only happen in some sort of profiling mode... Otherwise, firing one or two events per eval() call will really mess with performance in some benchmarks and maybe even some pages.
Comment 5 John J. Barton 2009-12-13 22:17:04 PST
For example, the mode where jsd it enabled. These events would be emitted in the same locations as the calls for bug 449464.  

Or we can simply record the timestamps and make them available via an API call. This would have much lower overhead while still allowing the time evolution of the page to be displayed. Then more info could be gather with more overhead using 449464.

Note You need to log in before you can comment on or make changes to this bug.