Cargando…

Mastering High Performance with Kotlin : Overcome Performance Difficulties in Kotlin with a Range of Exciting Techniques and Solutions.

A balance between implementing complex applications and optimizing performance is a present-day need. This book helps you achieve this balance while developing and deploying applications with Kotlin. You will learn how to use profiling tools to detect performance issues and discover bytecode that is...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Kucherenko, Igor
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Identifying Performance Bottlenecks; Reasons for performance issues; Memory management; Garbage collection; Working principles of the garbage collector; Impacts of garbage collection; Heap fragmentation; Finalization; Resource leaks; Memory leaks; String pool; Memory model; The problem of concurrency and parallelism; Java Memory Model (JMM); Synchronization; Slow rendering; Device refresh rate; Frame rate; Summary; Chapter 2: Identifying Indicators of Performance Issues; Benchmarking.
  • MicrobenchmarksJava Microbenchmark Harness (JMH); Benchmark modes; Benchmark time units; Benchmark state; State scope; Fixture methods; Levels of fixture methods; Writing good benchmarks; The pitfalls of loops; Dead Code Elimination; Using black holes; Constant folding; Kotlin benchmarks; IDEA JMH plugin; General performance metrics; Types of performance testing ; Performance testing process; Overview of performance testing tools; JMeter; Fabric; Summary; Chapter 3: Learning How to Use Profiling Tools; Memory profiling; Memory Viewer; HProf; Eclipse Memory Analyzer Tool; Histogram.
  • Shallow and Retained HeapDominator Tree; Top Consumers; Analyzing class loaders; Android Studio Memory Profiler; Memory categories; Recording memory allocation; Threads profiling; Threads viewer; Frames pane; The Threads pane; Thread profiling in the MAT; Threads Overview; Thread Details; CPU Profiler in Android Studio; Call Chart and Flame Chart tabs; Top Down and Bottom Up tabs; Summary; Chapter 4: Functional Approach; Functional programming; Declarative versus imperative; Pure functions; First-class functions; Higher-order functions; Function composition; Lambdas; Closures; Typeclasses.
  • Arrow libraryFunctor; Monad; Immutability; Inspecting functional features; Inline versus non-inline; Capturing and non-capturing lambdas; Summary; Chapter 5: Enhancing the Performance of Collections; Data structures; Arrays; Linked lists; Stacks; Queues; Sets; Maps; Hash tables; Binary search trees; Tries; Binary heaps; Graphs; Time complexity; Calculating time complexity; Time complexity of lists; Time complexity of sets; Time complexity of queues; Time complexity of maps; Collections in Kotlin; Sequences in Kotlin; Summary; Chapter 6: Optimizing Access to Properties; Fields and properties.
  • Backing fieldsBacking properties; @JvmField annotation; Compile-time constants; Inner classes; lateinit; Companion objects; Summary; Chapter 7: Preventing Unnecessary Overhead Using Delegates; Types of delegation; Explicit delegation; Implicit delegation; Class delegation; Delegated properties; Lazy; Creating a delegated property; Inspecting the lazy function; Observable delegates; Summary; Chapter 8: Ranges and Identifying Performance Issues; Ranges in Kotlin; Utility functions; Range benchmarking; Summary; Chapter 9: Multithreading and Reactive Programming; Concurrency and parallelism.