cameron mccoll developer visual basic team. vb compiler architecture overview best practices ...
TRANSCRIPT
![Page 1: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/1.jpg)
LIVE FROM REDMOND:VB9 - PERFORMANCE IMPROVEMENTS IN VISUAL STUDIO 2008
Cameron McCollDeveloperVisual Basic Team
![Page 2: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/2.jpg)
Overview: VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for 2008 Demos of Performance Improvements for
2008 How to deal with a performance problem What happens with a reported issue Q & A
![Page 3: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/3.jpg)
VB Compiler Architecture Overview Rich set of UI features in the Visual
Studio IDE VB compiles user code on a Background
(BG) Thread Each project in the solution is compiled
through 5 internal states:CS_NoState
CS_Declared
CS_Bound
CS_TypesEmitted
CS_Compiled
![Page 4: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/4.jpg)
VB Compiler Architecture Overview (cont) The BG Thread compilation enables many VB
specific IDE features When an edit occurs the compiler
determines the type of change and decompiles the affected projects and files
BG Thread will then begin to compile all projects once again
Some IDE features require the project has reached a certain internal state before it can complete
![Page 5: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/5.jpg)
Best Practices Get the latest product
Visual Studio 2008 addresses many of the biggest performance issues – very dramatically in some cases
SP1 for Visual Studio 2005 address several large issues
Method size Avoid doing too many tasks in a single method
Avoid excess methods per container Don’t let your files grow too large Limit the number of files per project Limit the number of projects per Solution
![Page 6: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/6.jpg)
Best Practices (cont) For a detailed look at developing code
with performance in mind: Microsoft Press: “Improving .NET Application
Performance and Scalability” ISBN: 0-7356-1851-8
![Page 7: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/7.jpg)
Known Issues & Common Pitfalls
Code located on network share Custom Code Snippets Processing XML Comments NVidia nView Manager Too Many Task List items 3rd Party Addins
![Page 8: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/8.jpg)
Improvements made for 2008 Compiler Throughput
Reduced decompilations Reduced memory requirements Better caching models
Improved Build Throughput Debugging Experience Stability = Less Crashes IDE Responsiveness
![Page 9: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/9.jpg)
Demos of Performance Improvements for 2008:Code Dropdowns are now Asynchronous
VS2005 VS2008
![Page 10: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/10.jpg)
Demos of Performance Improvements for 2008:Loading a Solution is now Asynchronous
VS2005 VS2008
![Page 11: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/11.jpg)
Demos of Performance Improvements for 2008:Stepping in the Debugger is much faster
VS2005 VS2008
![Page 12: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/12.jpg)
Demos of Performance Improvements for 2008: Progress Dialog with Cancel button
![Page 13: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/13.jpg)
Notes on the Wait Dialog: The goal is to never see this dialog.
If you see this regularly then we clearly have a performance problem and you should report it to us directly.
Dialog appears if a UI operation takes more than 2 seconds.
![Page 14: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/14.jpg)
How to deal with a performance problem What changed most recently? Try to isolate the exact steps to reproduce
the problem Check for the common pitfalls listed
previously Change one thing at a time Make sure you have the latest Service Pack Search MSDN and Forums for similar issues
![Page 15: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/15.jpg)
How to deal with a performance problem (cont) If you are sure that the problem is a
performance issue with Visual Studio itself feel free to contact us directly and we will work with you to diagnose the problem. [email protected]
![Page 16: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/16.jpg)
What happens with a reported issue (Watson)? Dump file created by customer or CSS Dump file uploaded to central server MS team attempts to identify cause Fix is made in next possible version
(sometimes patch)
![Page 17: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/17.jpg)
What happens with a reported issue (manual)? When the product is too slow we can
help in 2 ways: Customer can send their solution to
Microsoft (fastest) Create a dump file using a tool and upload
to Microsoft manually
![Page 18: Cameron McColl Developer Visual Basic Team. VB Compiler Architecture Overview Best Practices Known Issues/Common pitfalls Improvements made for](https://reader036.vdocument.in/reader036/viewer/2022062716/56649dba5503460f94aaa6c0/html5/thumbnails/18.jpg)
Q & A