Android App Optimisation: Tips and Tools for Better Performance
Download and listen anywhere
Download your favorite episodes and enjoy them, wherever you are! Sign up or log in now to access offline listening.
Android App Optimisation: Tips and Tools for Better Performance
This is an automatically generated transcript. Please note that complete accuracy is not guaranteed.
Description
The article provides tips and tools for optimising Android apps, focusing on performance issues that impact user experience. It highlights the importance of optimisation, noting that 86% of users uninstall...
show more- String vs StringBuilder: Using StringBuilder for multiple string appends is more efficient than direct string concatenation due to the immutability of strings.
- Correct Data Type: Choosing the right data structure (e.g., ArrayList vs. Vector, Set for unique objects) based on the use case can improve performance.
- Location Updates: Use Google Location Services API, request only the necessary location precision and update frequency, and stop updates when not needed.
- Network Requests: Batch network requests to minimise battery consumption and mobile data usage. Consider using GCM Network Manager for scheduling tasks.
- Reflection: Cache responses when using reflection for backward compatibility, as reflection can be slow.
- Autoboxing: Avoid autoboxing (converting primitive types to Object types) by using primitive types directly or specialised collections like SparseIntArray.
- OnDraw: Optimise the onDraw() function by avoiding object allocation and minimising drawing operations.
- ViewHolders: Use the ViewHolder design pattern to smooth scrolling lists by caching view lookups.
- Resizing Images: Resize images before displaying them to avoid memory issues, and consider using third-party libraries like Picasso, Universal Image Loader, Fresco, or Glide.
- Strict Mode: Use Strict Mode during development to detect network requests or disk accesses on the main thread, but disable it in production builds.
- Android Monitor: Built-in tool in Android Studio that provides graphs for Network, CPU, GPU, and Memory usage.
- GPU Overdraw: Tool in Developer Options that shows overdraw areas with different colours, indicating how many times an area was overdrawn.
- GPU Rendering: Tool in Developer options that displays coloured bars on the screen, representing the time spent on different rendering phases.
- Hierarchy Viewer: Tool for getting an overview of view hierarchies and identifying useless views or performance bottlenecks.
Information
| Author | Bholendra Singh |
| Organization | Bholendra Singh |
| Website | - |
| Tags |
-
|
Copyright 2026 - Spreaker Inc. an iHeartMedia Company
Comments