On 7/1/14, 10:52 AM, Jason Orendorff wrote:

Events are *not* delivered synchronously. As JS code executes, a log is
written. Occasionally, the log is then parsed and records are delivered to devtools code via the enterFunction and leaveFunction methods above. (This
batching should improve performance, by minimizing C++-to-JS-to-C++ and
cross-compartment calls.)

Because all the devtools are designed to work remotely from day one*, we will be sending these logs over the Remote Debugging Protocol from the debuggee device (the Firefox OS / Fennec phone, etc) to the debugger device (desktop Firefox) where the data will be processed in a worker and eventually displayed to the user.

It would be a shame if we did this:

1. Collect log in SpiderMonkey
2. Parse log into JS objects
3. Deliver to hooks devtools set
4. Re-serialize JS objects into a log for transport
5. Send log over RDP
6. Parse log into JS objects again

When if the log was exposed to devtools as some kind of blob / typed array that we can send across the RDP as binary data, we could do this:

1. Collect the log in SpiderMonkey on the debuggee device
2. Deliver the log blob to a hook the devtools set
3. Send log blob over RDP
4. On the debugger device, devtools code asks Debugger to parse the blob

This way we aren't repeatedly parsing and serializing (to potentially different formats!) for no good reason.

Nick

* At least, our tools are designed remote-able from day one now days. A couple years ago, this was not always the case.
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to