180 likes | 446 Views
PC53. Building High P erformance JScript Applications. Sameer Chabungbam Program Manager Microsoft Corporation. Agenda. What affects Script performance? The IE8 JScript Profiler Native JSON Support. IE8 Browser Subsystem. Internet Explorer. HTML Parser. Layout. Rendering.
E N D
PC53 BuildingHigh PerformanceJScriptApplications Sameer Chabungbam Program Manager Microsoft Corporation
Agenda • What affects Script performance? • The IE8 JScript Profiler • Native JSON Support
IE8 Browser Subsystem Internet Explorer HTML Parser Layout Rendering JScript Network/OS IE8 Browser Subsystem
demo IE8 JScript Profiler
IE8 JScript Profiler • Uses script engine instrumentation • Export data to CSV • Shows calls to JScript Built-in methods • Handles anonymous functions var Shape = { Area : function (){...} //anonymous function 1}; Foo = function (){...} //anonymous function 2
IE8 JScript ProfilerArchitecture Host (Internet Explorer) • Host creates the script engine(s) • Script Engine creates Logger when profiling is enabled • Logger handles callbacks from the script engine • Profiler Core collects and analyzes the performance data • Profiler GUI displays the performance report Script Engine Profiler GUI Logger Profiler Core
IE8 JScript Profiler APIIActiveScriptProfilerControl Host (Internet Explorer) • Implemented by Script Engines • Methods • StartProfiling • StopProfiling • SetProfilerEventMask Script Engine Profiler GUI IActiveScriptProfilerControl Logger Profiler Core
IE8 JScript Profiler APIIActiveScriptProfilerCallback Host (Internet Explorer) • Implemented by Profile Logger • Handles callbacks from the script engine • Methods • Initialize • Shutdown • ScriptCompiled • FunctionCompiled • OnFunctionEnter • OnFunctionExit Script Engine Profiler GUI IActiveScriptProfilerCallback IActiveScriptProfilerControl Logger Profiler Core
Native JSON Support • Simple • Javascript like syntax { "name“ : "Sameer Chabungbam", "email" : "sameerch@microsoft.com", "phone" : [ "+91 40 669 42615", "+91 9949 75 4546" ] }
demo Native JSON
Native JSON Support • Fast • Secure • ECMAScript “3.1” Proposal: • “JSON” is a new Built-in Object • JSON.parse(jsontext) • Returns a JScript value – an Object or Array • JSON.stringify(value) • Returns a JSON string
Other Enhancements • CSS Selector API • Mutable DOM prototype • Data URI
Resources • Email: sameerch@microsoft.com • IE Blogs http://blogs.msdn.com/ie • JScript Blogs http://blogs.msdn.com/jscript • MSDN Documentation • Profiler • JSON • IE8 Beta 2 http://microsoft.com/ie/ie8 • JSON http://www.json.org/
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.