Book Image

TypeScript High Performance

By : Ajinkya Kher
Book Image

TypeScript High Performance

By: Ajinkya Kher

Overview of this book

<p>In a world where a tiny decrease in frames per second impacts customer engagement greatly, writing highly scalable code is more of a necessity than a luxury. Using TypeScript you get type checking during development. This gives you the power to write optimized code quickly. This book is also a solid tool to those who’re curious to understand the impact of performance in production, and it is of the greatest aid to the proactive developers who like to be cognizant of and avoid the classic pitfalls while coding.</p> <p>The book will starts with explaining the efficient implementation of basic data Structures, data types, and flow control. You will then learn efficient use of advanced language constructs and asynchronous programming. Further, you'll learn different configurations available with TSLint to improve code quality and performance. Next, we'll introduce you to the concepts of profiling and then we deep dive into profiling JS with several tools such as firebug, chrome, fiddler. Finally, you'll learn techniques to build and deploy real world large scale TypeScript applications.</p>
Table of Contents (17 chapters)
Title Page
Credits
Foreword
About the Author
Acknowlegement
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
7
Profile Deployed JS with Developer Tools and Fiddler

Non-blocking UI


Actually the answers to the questions posed in the previous section were answered partly in Chapter 4, Asynchronous Programming and Responsive UI. We explored when and how asynchronous programming practices should be leveraged to deliver high performance and responsive user interfaces. Let's explore a few more strategies that can be adopted to ensure a superfast user experience.

We will explore two scenarios and, in the process, understand what we need to keep in mind while developing applications. These concepts can be used elsewhere in any other scenarios.

Massive data downloads

Sticking to the social media example, consider fetching an entire social feed for a logged in user. We ensure that the critical path targets are met by delivering only a simple HTML page devoid of any scripts. Now, as the user begins to navigate in the feed, and for example, hits the Feed tab on the UI, we expect to load the entire social feed for the day for the user. This feed consists of posts by...