Book Image

Delphi High Performance

By : Primož Gabrijelčič
Book Image

Delphi High Performance

By: Primož Gabrijelčič

Overview of this book

Delphi is a cross-platform Integrated Development Environment (IDE) that supports rapid application development for Microsoft Windows, Apple Mac OS X, Google Android, iOS, and now Linux with RAD Studio 10.2. This book will be your guide to build efficient high performance applications with Delphi. The book begins by explaining how to find performance bottlenecks and apply the correct algorithm to fix them. It will teach you how to improve your algorithms before taking you through parallel programming. You’ll then explore various tools to build highly concurrent applications. After that, you’ll delve into improving the performance of your code and master cross-platform RTL improvements. Finally, we’ll go through memory management with Delphi and you’ll see how to leverage several external libraries to write better performing programs. By the end of the book, you’ll have the knowledge to create high performance applications with Delphi.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Responsive user interfaces


A user's first contact with any program is always the user interface. A good UI can make or break a program. Leaving the user interface design aside (as I am not qualified to speak about that), I will focus on just one fact.

Users hate user interfaces that are not responsive.

In other words, every good user interface must react quickly to a user's input, be that a keyboard, mouse, touchpad, or anything else.

What are the tasks that can make a user interface unresponsive? Basically, they all fall into one of two categories:

  1. A program is running a slow piece of code. While it is running, the UI is not responding.
  2. Updating the user interface itself takes a long time.

The problems from the first category fall into two subsets—functions that have non-blocking (asynchronous) alternative and functions that don't.

Sometimes we can replace the slow function with another one that runs asynchronously. For example, instead of using a standard function for reading from a file, we...