没有合适的资源?快使用搜索试试~ 我知道了~
首页Pro .NET Performance.pdf
Pro .NET Performance.pdf

精通.NET性能调优的必备书籍!Pro .NET Performance.pdf
资源详情
资源评论
资源推荐

v
Contents at a Glance
Foreword ......................................................................................................................xv
About the Authors ....................................................................................................... xvii
About the Technical Reviewers ................................................................................... xix
Acknowledgments ....................................................................................................... xxi
Introduction ...............................................................................................................xxiii
Chapter 1: Performance Metrics ■ .................................................................................1
Chapter 2: Performance Measurement ■ ........................................................................7
Chapter 3: Type Internals ■ ..........................................................................................61
Chapter 4: Garbage Collection ■ ...................................................................................91
Chapter 5: Collections and Generics ■ ........................................................................145
Chapter 6: Concurrency and Parallelism ■ .................................................................173
Chapter 7: Networking, I/O, and Serialization ■ .........................................................215
Chapter 8: Unsafe Code and Interoperability ■ ...........................................................235
Chapter 9: Algorithm Optimization ■ ..........................................................................259
Chapter 10: Performance Patterns ■ ..........................................................................277
Chapter 11: Web Application Performance ■ ..............................................................305
Index ...........................................................................................................................335
www.it-ebooks.info

xxiii
Introduction
is book has come to be because we felt there was no authoritative text that covered all three areas relevant to
.NET application performance:
Identifying performance metrics and then measuring application performance to verify •
whether it meets or exceeds these metrics.
Improving application performance in terms of memory management, networking, I/O, •
concurrency, and other areas.
Understanding CLR and .NET internals in sucient detail to design high-performance •
applications and x performance issues as they arise.
We believe that .NET developers cannot achieve systematically high-performance software solutions without
thoroughly understanding all three areas. For example, .NET memory management (facilitated by the CLR
garbage collector) is an extremely complex eld and the cause of signicant performance problems, including
memory leaks and long GC pause times. Without understanding how the CLR garbage collector operates,
high-performance memory management in .NET is left to nothing but chance. Similarly, choosing the proper
collection class from what the .NET Framework has to oer, or deciding to implement your own, requires
comprehensive familiarity with CPU caches, runtime complexity, and synchronization issues.
is book’s 11 chapters are designed to be read in succession, but you can jump back and forth between topics
and ll in the blanks when necessary. e chapters are organized into the following logical parts:
Chapter 1 and Chapter 2 deal with performance metrics and performance measurement. •
ey introduce the tools available to you to measure application performance.
Chapter 3 and Chapter 4 dive deep into CLR internals. ey focus on type internals •
and the implementation of CLR garbage collection—two crucial topics for improving
application performance where memory management is concerned.
Chapter 5, Chapter 6, Chapter 7, Chapter 8, and Chapter 11 discuss specic areas of the •
.NET Framework and the CLR that oer performance optimization opportunities—using
collections correctly, parallelizing sequential code, optimizing I/O and networking
operations, using interoperability solutions eciently, and improving the performance of
Web applications.
Chapter 9 is a brief foray into complexity theory and algorithms. It was written to give you •
a taste of what algorithm optimization is about.
Chapter 10 is the dumping ground for miscellaneous topics that didn’t t elsewhere in the •
book, including startup time optimization, exceptions, and .NET Reection.
Some of these topics have prerequisites that will help you understand them better. roughout the course of the
book we assume substantial experience with the C# programming language and the .NET Framework, as well as
familiarity with fundamental concepts, including:
www.it-ebooks.info

xxiv
■ IntroduCtIon
Windows: threads, synchronization, virtual memory•
Common Language Runtime (CLR): Just-In-Time (JIT) compiler, Microsoft Intermediate •
Language (MSIL), garbage collector
Computer organization: main memory, cache, disk, graphics card, network interface•
ere are quite a few sample programs, excerpts, and benchmarks throughout the book. In the interest of not
making this book any longer, we often included only a brief part—but you can nd the whole program in the
companion source code on the book’s website.
In some chapters we use code in x86 assembly language to illustrate how CLR mechanisms operate or to
explain more thoroughly a specic performance optimization. Although these parts are not crucial to the book’s
takeaways, we recommend dedicated readers to invest some time in learning the fundamentals of x86 assembly
language. Randall Hyde’s freely available book “e Art of Assembly Language Programming”
(http://www.artofasm.com/Windows/index.html) is an excellent resource.
In conclusion, this book is full of performance measurement tools, small tips and tricks for improving minor
areas of application performance, theoretical foundations for many CLR mechanisms, practical code examples,
and several case studies from the authors’ experience. For almost ten years we have been optimizing applications
for our clients and designing high-performance systems from scratch. During these years we trained hundreds of
developers to think about performance at every stage of the software development lifecycle and to actively seek
opportunities for improving application performance. After reading this book, you will join the ranks of
high-performance .NET application developers and performance investigators optimizing existing applications.
Sasha Goldshtein
Dima Zurbalev
Ido Flatow
www.it-ebooks.info
剩余360页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论1