Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
The Road To Single Dex (Gradle Summit 2017)Jared Burrows
Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
Use case for using the ElastiCache for Redis in production知教 本間
This document discusses using ElastiCache for Redis in production. It begins with an introduction to the author and their role at gumi Inc. It then provides an overview of Redis operations and data persistence methods. The document outlines gumi's migration from memcached to Redis, including their use of master-slave replication and multiple databases. It notes potential issues with ElastiCache for Redis like lack of auto failover and inability to change instance types. In summary, while some features are still missing, ElastiCache for Redis allows quick node provisioning and has proven reliable for gumi despite initial function gaps.
This document discusses writing modular and encapsulated Redis code. It introduces the concepts of promises and futures as they relate to Redis pipelines and transactions. Promises schedule Redis operations, returning future objects that can be transformed and bound to variables. This approach separates data access logic from business logic, making the code more readable, maintainable and refactorable compared to do-everything functions.
Tailoring Redis Modules For Your Users’ NeedsRedis Labs
This document discusses using Redis modules to tailor Redis for users' needs. Redis modules allow adding new commands, data types, and APIs to Redis in order to make Redis understand custom data, speak custom languages, and do custom work. With modules, code can be consolidated across platforms, network hops minimized, and computation moved closer to data. The ReDe module is provided as an example of implementing an event dehydration algorithm in Redis using a module.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
Trend Micro uses Hadoop for processing large volumes of web data to quickly identify and block malicious URLs. They have expanded their Hadoop cluster significantly over time to support growing data and job volumes. They developed Hadooppet to automate deployment and management of their large, customized Hadoop distribution across hundreds of nodes. Profiling tools like Nagios, Ganglia and Splunk help monitor and troubleshoot cluster performance issues.
Kafka Summit NYC 2017 - The Best Thing Since Partitioned Bread confluent
The document discusses Apache Kafka's new Streams API for stream processing. It introduces the Streams API and provides examples of stateless and stateful computations that can be performed on streams of data. It also notes that the Streams API is now in production use at LINE Corp, processing millions of messages per second, and provides additional resources for learning more about the Streams API.
The Road To Single Dex (Gradle Summit 2017)Jared Burrows
Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
Use case for using the ElastiCache for Redis in production知教 本間
This document discusses using ElastiCache for Redis in production. It begins with an introduction to the author and their role at gumi Inc. It then provides an overview of Redis operations and data persistence methods. The document outlines gumi's migration from memcached to Redis, including their use of master-slave replication and multiple databases. It notes potential issues with ElastiCache for Redis like lack of auto failover and inability to change instance types. In summary, while some features are still missing, ElastiCache for Redis allows quick node provisioning and has proven reliable for gumi despite initial function gaps.
This document discusses writing modular and encapsulated Redis code. It introduces the concepts of promises and futures as they relate to Redis pipelines and transactions. Promises schedule Redis operations, returning future objects that can be transformed and bound to variables. This approach separates data access logic from business logic, making the code more readable, maintainable and refactorable compared to do-everything functions.
Tailoring Redis Modules For Your Users’ NeedsRedis Labs
This document discusses using Redis modules to tailor Redis for users' needs. Redis modules allow adding new commands, data types, and APIs to Redis in order to make Redis understand custom data, speak custom languages, and do custom work. With modules, code can be consolidated across platforms, network hops minimized, and computation moved closer to data. The ReDe module is provided as an example of implementing an event dehydration algorithm in Redis using a module.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
Trend Micro uses Hadoop for processing large volumes of web data to quickly identify and block malicious URLs. They have expanded their Hadoop cluster significantly over time to support growing data and job volumes. They developed Hadooppet to automate deployment and management of their large, customized Hadoop distribution across hundreds of nodes. Profiling tools like Nagios, Ganglia and Splunk help monitor and troubleshoot cluster performance issues.
Kafka Summit NYC 2017 - The Best Thing Since Partitioned Bread confluent
The document discusses Apache Kafka's new Streams API for stream processing. It introduces the Streams API and provides examples of stateless and stateful computations that can be performed on streams of data. It also notes that the Streams API is now in production use at LINE Corp, processing millions of messages per second, and provides additional resources for learning more about the Streams API.
Going Serverless with Java - a real life storyHerman Lintvelt
It took us a few months to roll out a complete production quality backend system for a new application using AWS, Java and the serverless.com framework. In this talk I want to take you through what we learned. We will see how to get going, how to think about designing your services (hint: DDD), which AWS services to consider, how to deploy, test, monitor & debug it. And then of course all the interesting tips and tricks you don’t find in the documentation, like how to define your API using Swagger, how to keep secrets safe, and 3 different ways to map Lambda events to Java.
Compliance as Code with terraform-complianceEmre Erkunt
terraform-compliance is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated HadoopYafang Chang
In enterprise on-premises data center, we may have multiple Secured Hadoop clusters for different purpose. Sometimes, these Hadoop clusters might have different Hadoop distribution, Hadoop version, or even locat in different Data Center. To fulfill business requirement, data synchronize between these clusters could be an important mechanism. However, the story will be more complicated within the real world secured multi-cluster, compare to distcp between two same version and non-secured Hadoop clusters.
We would like to go through our experience on enable live data synchronization for mutiple kerberos enabled Hadoop clusters. Which include the functionality verification, multi-cluster configurations and automation setup process, etc. After that, we would share the use cases among those kerberos federated Hadoop clusters. Finally, provide our common practice on multi-cluster data synchronization.
Handling Redis failover with ZooKeeperryanlecompte
This document discusses using ZooKeeper to automatically handle Redis failover. ZooKeeper is an open-source tool that provides primitives for building distributed applications and handles tasks like leader election and quorum management. The presenter describes how his redis_failover Ruby gem uses ZooKeeper to monitor Redis servers, detect failures, and automatically inform clients so they reconnect to the new master, preventing downtime during a failover. Several companies already use this approach with redis_failover to make their Redis infrastructure more robust and fault-tolerant.
DevoxxUK: Optimizating Application Performance on KubernetesDinakar Guniguntala
Now that you have your apps running on K8s, wondering how to get the response time that you need ? Tuning a polyglot set of microservices to get the performance that you need can be challenging in Kubernetes. The key to overcoming this is observability. Luckily there are a number of tools such as Prometheus that can provide all the metrics you need, but here is the catch, there is so much of data and metrics that is difficult make sense of it all. This is where Hyperparameter tuning can come to the rescue to help build the right models.
This talk covers best practices that will help attendees
1. To understand and avoid common performance related problems.
2. Discuss observability tools and how they can help identify perf issues.
3. Look closer into Kruize Autotune which is a Open Source Autonomous Performance Tuning Tool for Kubernetes and where it can help.
This document summarizes the key aspects of a public cloud archive storage solution. It offers affordable and unlimited storage using standard transfer protocols. Data is stored using erasure coding for redundancy and fault tolerance. Accessing archived data takes 10 minutes to 12 hours depending on previous access patterns, with faster access for inactive archives. The solution uses middleware to handle sealing and unsealing archives along with tracking access patterns to regulate retrieval times.
OpenStack APIs: Present and Future (Beta Talk)Wade Minter
OpenStack APIs: Present and Future by H. Wade Minter provides an overview of OpenStack storage (Swift) APIs and how to use them. The document discusses how OpenStack is an open source cloud computing platform producing interrelated projects for cloud infrastructure. It then summarizes the Swift storage component and demonstrates making API calls to authenticate, list containers and objects, upload/download objects, and set metadata using CURL examples. Language bindings like Ruby gems simplify using the OpenStack Storage APIs.
The document discusses various techniques for optimizing Java application performance on Kubernetes, including:
1. Using optimized container images that are small in size and based on Alpine Linux.
2. Configuring the JVM to use container resources efficiently through settings like -XX:MaxRAMPercentage instead of hardcoded heap sizes.
3. Setting appropriate resource requests and limits for pods to ensure performance isolation and prevent throttling.
4. Leveraging tools like Kubernetes' Horizontal Pod Autoscaler and Pod Disruption Budget for scaling and high availability.
5. Tuning both software and hardware settings for optimal performance of Java workloads on Kubernetes.
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
Reproducible builds, fast and safe deployment process together with self-healing services form the basis of stable and maintainable infrastructure. In this talk I’d like to cover, from the Site Reliability Engineering (SRE) perspective, how Dropbox addresses above challenges, what technologies are used and what lessons were learnt during implementation process.
The document describes a presentation about data processing with CDK (Cloud Development Kit). It includes an agenda that covers CDK and Projen, serverless ETL with Glue, Databrew with continuous integration/continuous delivery (CICD), and using Amazon Comprehend with S3 object lambdas. Constructs are demonstrated for building architectures with CDK across multiple programming languages. Examples are provided of using CDK to implement Glue workflows, Databrew CICD pipelines, and combining Comprehend with S3 object lambdas for PII detection and redaction.
Infrastructure-as-code: bridging the gap between Devs and OpsMykyta Protsenko
Ops are overwhelmed with support. Devs are mad because their cannot deploy the changes as fast as they want. Sounds familiar?
Infrastructure-as-code can make your life easier by empowering developers and reducing operations' routine toil. It can cut down the lead time for infrastructure provisioning from hours or even days to minutes.
This talk reviews several IaC tools and approaches, showing how to integrate them into continuous delivery pipeline. It covers the problems and challenges that engineers may face while working with infrastructure-as-code tools and provides a few hands-on recipes to address them.
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
This document discusses running Elasticsearch clusters on Docker containers. It describes how Docker containers are more lightweight than virtual machines and have less overhead. It provides examples of running official Elasticsearch Docker images and customizing configurations. It also covers best practices for networking, storage, constraints, and high availability when running Elasticsearch on Docker.
Description of some of the elements that go in to creating a PostgreSQL-as-a-Service for organizations with many teams and a diverse ecosystem of applications and teams.
Get Your Insecure PostgreSQL Passwords to SCRAMJonathan Katz
Passwords: they just seem to work. You connect to your PostgreSQL database and you are prompted for your password. You type in the correct character combination, and presto! you're in, safe and sound.
But what if I told you that all was not as it seemed. What if I told you there was a better, safer way to use passwords with PostgreSQL? What if I told you it was imperative that you upgraded, too?
PostgreSQL 10 introduced SCRAM (Salted Challenge Response Authentication Mechanism), introduced in RFC 5802, as a way to securely authenticate passwords. The SCRAM algorithm lets a client and server validate a password without ever sending the password, whether plaintext or a hashed form of it, to each other, using a series of cryptographic methods.
In this talk, we will look at:
* A history of the evolution of password storage and authentication in PostgreSQL
* How SCRAM works with a step-by-step deep dive into the algorithm (and convince you why you need to upgrade!)
* SCRAM channel binding, which helps prevent MITM attacks during authentication
* How to safely set and modify your passwords, as well as how to upgrade to SCRAM-SHA-256 (which we will do live!)
all of which will be explained by some adorable elephants and hippos!
At the end of this talk, you will understand how SCRAM works, how to ensure your PostgreSQL drivers supports it, how to upgrade your passwords to using SCRAM-SHA-256, and why you want to tell other PostgreSQL password mechanisms to SCRAM!
This is Apache ZooKeeper session.
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
By the end of this presentation you should be fairly clear about Apache ZooKeeper.
To watch the video or know more about the course, please visit
http://www.knowbigdata.com/page/big-data-and-hadoop-online-instructor-led-training
- Kerberos is used to authenticate Hadoop services and clients running on different nodes communicating over a non-secure network. It uses tickets for authentication.
- Key configuration changes are required to enable Kerberos authentication in Hadoop including setting hadoop.security.authentication to kerberos and generating keytabs containing principal keys for HDFS services.
- Services are associated with Kerberos principles using keytabs which are then configured for use by the relevant Hadoop processes and services.
Safely Protect PostgreSQL Passwords - Tell Others to SCRAMJonathan Katz
Jonathan S. Katz gave a talk on safely protecting passwords in PostgreSQL. He discussed:
- The evolution of password management in PostgreSQL, from storing passwords in plain text to using md5 hashes to modern SCRAM authentication.
- How plain text and md5 password storage are insecure as passwords can be intercepted or cracked.
- The SCRAM authentication standard which allows two parties to verify they know a secret without exchanging the secret directly.
- How PostgreSQL implements SCRAM-SHA-256 to generate a secure verifier from the password and authenticate users with random salts and iterations to secure against brute force attacks.
LinkRest (http://linkrest.io) is a small HTTP-based protocol and a Java framework that rethinks how REST APIs should be built and consumed. It turns each API endpoint into a graph query engine, giving the client full control over the shape and contents of the requested data sets, while the server controls query strategy and security. The talk will start with the easy parts – how to reuse an existing Apache Cayenne ORM model for the REST service and write simple Java one-liners to get it up and running. Then we will delve into alternative backends, graph access security and parallel data processing.
Generating efficient APK by Reducing Size and Improving PerformanceParesh Mayani
Talk delivered in GDG Ahmedabad DevFest 2017 (#DevFestAhm) on 5th November, 2017.
Talked about various tips/tricks and steps to reduce apk size. Also covered some of the tools that I have used for reducing apk size.
Enjoy actual presentation with GIFs http://bit.ly/reduce-apk-size-drive
AndroidX is a major refactor of the Android Support Library that provides backwards compatibility since AndroidX has more logical artifact names and finer-grained libraries. It addresses issues with the legacy Support Library like inconsistent versioning that could cause crashes. AndroidX features like RecyclerView selection and Slices make app development easier, and Android KTX extensions allow writing more concise Kotlin code. The migration to AndroidX helps modernize third-party libraries and provides a better foundation for future Android features.
Going Serverless with Java - a real life storyHerman Lintvelt
It took us a few months to roll out a complete production quality backend system for a new application using AWS, Java and the serverless.com framework. In this talk I want to take you through what we learned. We will see how to get going, how to think about designing your services (hint: DDD), which AWS services to consider, how to deploy, test, monitor & debug it. And then of course all the interesting tips and tricks you don’t find in the documentation, like how to define your API using Swagger, how to keep secrets safe, and 3 different ways to map Lambda events to Java.
Compliance as Code with terraform-complianceEmre Erkunt
terraform-compliance is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated HadoopYafang Chang
In enterprise on-premises data center, we may have multiple Secured Hadoop clusters for different purpose. Sometimes, these Hadoop clusters might have different Hadoop distribution, Hadoop version, or even locat in different Data Center. To fulfill business requirement, data synchronize between these clusters could be an important mechanism. However, the story will be more complicated within the real world secured multi-cluster, compare to distcp between two same version and non-secured Hadoop clusters.
We would like to go through our experience on enable live data synchronization for mutiple kerberos enabled Hadoop clusters. Which include the functionality verification, multi-cluster configurations and automation setup process, etc. After that, we would share the use cases among those kerberos federated Hadoop clusters. Finally, provide our common practice on multi-cluster data synchronization.
Handling Redis failover with ZooKeeperryanlecompte
This document discusses using ZooKeeper to automatically handle Redis failover. ZooKeeper is an open-source tool that provides primitives for building distributed applications and handles tasks like leader election and quorum management. The presenter describes how his redis_failover Ruby gem uses ZooKeeper to monitor Redis servers, detect failures, and automatically inform clients so they reconnect to the new master, preventing downtime during a failover. Several companies already use this approach with redis_failover to make their Redis infrastructure more robust and fault-tolerant.
DevoxxUK: Optimizating Application Performance on KubernetesDinakar Guniguntala
Now that you have your apps running on K8s, wondering how to get the response time that you need ? Tuning a polyglot set of microservices to get the performance that you need can be challenging in Kubernetes. The key to overcoming this is observability. Luckily there are a number of tools such as Prometheus that can provide all the metrics you need, but here is the catch, there is so much of data and metrics that is difficult make sense of it all. This is where Hyperparameter tuning can come to the rescue to help build the right models.
This talk covers best practices that will help attendees
1. To understand and avoid common performance related problems.
2. Discuss observability tools and how they can help identify perf issues.
3. Look closer into Kruize Autotune which is a Open Source Autonomous Performance Tuning Tool for Kubernetes and where it can help.
This document summarizes the key aspects of a public cloud archive storage solution. It offers affordable and unlimited storage using standard transfer protocols. Data is stored using erasure coding for redundancy and fault tolerance. Accessing archived data takes 10 minutes to 12 hours depending on previous access patterns, with faster access for inactive archives. The solution uses middleware to handle sealing and unsealing archives along with tracking access patterns to regulate retrieval times.
OpenStack APIs: Present and Future (Beta Talk)Wade Minter
OpenStack APIs: Present and Future by H. Wade Minter provides an overview of OpenStack storage (Swift) APIs and how to use them. The document discusses how OpenStack is an open source cloud computing platform producing interrelated projects for cloud infrastructure. It then summarizes the Swift storage component and demonstrates making API calls to authenticate, list containers and objects, upload/download objects, and set metadata using CURL examples. Language bindings like Ruby gems simplify using the OpenStack Storage APIs.
The document discusses various techniques for optimizing Java application performance on Kubernetes, including:
1. Using optimized container images that are small in size and based on Alpine Linux.
2. Configuring the JVM to use container resources efficiently through settings like -XX:MaxRAMPercentage instead of hardcoded heap sizes.
3. Setting appropriate resource requests and limits for pods to ensure performance isolation and prevent throttling.
4. Leveraging tools like Kubernetes' Horizontal Pod Autoscaler and Pod Disruption Budget for scaling and high availability.
5. Tuning both software and hardware settings for optimal performance of Java workloads on Kubernetes.
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
Reproducible builds, fast and safe deployment process together with self-healing services form the basis of stable and maintainable infrastructure. In this talk I’d like to cover, from the Site Reliability Engineering (SRE) perspective, how Dropbox addresses above challenges, what technologies are used and what lessons were learnt during implementation process.
The document describes a presentation about data processing with CDK (Cloud Development Kit). It includes an agenda that covers CDK and Projen, serverless ETL with Glue, Databrew with continuous integration/continuous delivery (CICD), and using Amazon Comprehend with S3 object lambdas. Constructs are demonstrated for building architectures with CDK across multiple programming languages. Examples are provided of using CDK to implement Glue workflows, Databrew CICD pipelines, and combining Comprehend with S3 object lambdas for PII detection and redaction.
Infrastructure-as-code: bridging the gap between Devs and OpsMykyta Protsenko
Ops are overwhelmed with support. Devs are mad because their cannot deploy the changes as fast as they want. Sounds familiar?
Infrastructure-as-code can make your life easier by empowering developers and reducing operations' routine toil. It can cut down the lead time for infrastructure provisioning from hours or even days to minutes.
This talk reviews several IaC tools and approaches, showing how to integrate them into continuous delivery pipeline. It covers the problems and challenges that engineers may face while working with infrastructure-as-code tools and provides a few hands-on recipes to address them.
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
This document discusses running Elasticsearch clusters on Docker containers. It describes how Docker containers are more lightweight than virtual machines and have less overhead. It provides examples of running official Elasticsearch Docker images and customizing configurations. It also covers best practices for networking, storage, constraints, and high availability when running Elasticsearch on Docker.
Description of some of the elements that go in to creating a PostgreSQL-as-a-Service for organizations with many teams and a diverse ecosystem of applications and teams.
Get Your Insecure PostgreSQL Passwords to SCRAMJonathan Katz
Passwords: they just seem to work. You connect to your PostgreSQL database and you are prompted for your password. You type in the correct character combination, and presto! you're in, safe and sound.
But what if I told you that all was not as it seemed. What if I told you there was a better, safer way to use passwords with PostgreSQL? What if I told you it was imperative that you upgraded, too?
PostgreSQL 10 introduced SCRAM (Salted Challenge Response Authentication Mechanism), introduced in RFC 5802, as a way to securely authenticate passwords. The SCRAM algorithm lets a client and server validate a password without ever sending the password, whether plaintext or a hashed form of it, to each other, using a series of cryptographic methods.
In this talk, we will look at:
* A history of the evolution of password storage and authentication in PostgreSQL
* How SCRAM works with a step-by-step deep dive into the algorithm (and convince you why you need to upgrade!)
* SCRAM channel binding, which helps prevent MITM attacks during authentication
* How to safely set and modify your passwords, as well as how to upgrade to SCRAM-SHA-256 (which we will do live!)
all of which will be explained by some adorable elephants and hippos!
At the end of this talk, you will understand how SCRAM works, how to ensure your PostgreSQL drivers supports it, how to upgrade your passwords to using SCRAM-SHA-256, and why you want to tell other PostgreSQL password mechanisms to SCRAM!
This is Apache ZooKeeper session.
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
By the end of this presentation you should be fairly clear about Apache ZooKeeper.
To watch the video or know more about the course, please visit
http://www.knowbigdata.com/page/big-data-and-hadoop-online-instructor-led-training
- Kerberos is used to authenticate Hadoop services and clients running on different nodes communicating over a non-secure network. It uses tickets for authentication.
- Key configuration changes are required to enable Kerberos authentication in Hadoop including setting hadoop.security.authentication to kerberos and generating keytabs containing principal keys for HDFS services.
- Services are associated with Kerberos principles using keytabs which are then configured for use by the relevant Hadoop processes and services.
Safely Protect PostgreSQL Passwords - Tell Others to SCRAMJonathan Katz
Jonathan S. Katz gave a talk on safely protecting passwords in PostgreSQL. He discussed:
- The evolution of password management in PostgreSQL, from storing passwords in plain text to using md5 hashes to modern SCRAM authentication.
- How plain text and md5 password storage are insecure as passwords can be intercepted or cracked.
- The SCRAM authentication standard which allows two parties to verify they know a secret without exchanging the secret directly.
- How PostgreSQL implements SCRAM-SHA-256 to generate a secure verifier from the password and authenticate users with random salts and iterations to secure against brute force attacks.
LinkRest (http://linkrest.io) is a small HTTP-based protocol and a Java framework that rethinks how REST APIs should be built and consumed. It turns each API endpoint into a graph query engine, giving the client full control over the shape and contents of the requested data sets, while the server controls query strategy and security. The talk will start with the easy parts – how to reuse an existing Apache Cayenne ORM model for the REST service and write simple Java one-liners to get it up and running. Then we will delve into alternative backends, graph access security and parallel data processing.
Generating efficient APK by Reducing Size and Improving PerformanceParesh Mayani
Talk delivered in GDG Ahmedabad DevFest 2017 (#DevFestAhm) on 5th November, 2017.
Talked about various tips/tricks and steps to reduce apk size. Also covered some of the tools that I have used for reducing apk size.
Enjoy actual presentation with GIFs http://bit.ly/reduce-apk-size-drive
AndroidX is a major refactor of the Android Support Library that provides backwards compatibility since AndroidX has more logical artifact names and finer-grained libraries. It addresses issues with the legacy Support Library like inconsistent versioning that could cause crashes. AndroidX features like RecyclerView selection and Slices make app development easier, and Android KTX extensions allow writing more concise Kotlin code. The migration to AndroidX helps modernize third-party libraries and provides a better foundation for future Android features.
A lecture for a college class: Hacking Mobile Devices at CCSF
Based on "The Mobile Application Hacker's Handbook 1st Edition", by Dominic Chell
Instructor: Sam Bowne
More info: https://samsclass.info/128/128_S19.shtml
This document provides an overview of DevOPS concepts including containers, Docker, and related tools. It discusses what containers are and the differences between virtual machines and containers. It then covers how containers can be used by developers and systems engineers. Docker is introduced as a tool for running and managing containers. Dockerfiles are described as documents for assembling container images. Docker Compose is presented as a tool for defining and running multi-container applications. Examples are given for creating a simple container with Dockerfile and running it locally and sharing it publicly. Monitoring tools like cAdvisor are mentioned. The document ends with discussing continuous integration/deployment using tools like Gitlab and Jenkins to automate the build and deployment process.
Best practises how to reduce Android application install size & improve your app install conversation rate. Video can be found here youtu.be/ksgW-VHH-Qo
To ∞ (~65K) and beyond! - Sebastiano Gottardo - Codemotion Milan 2016Codemotion
This talk focuses on analyzing the infamous 65K methods limit for Android apps, from a pragmatic and down-to-earth perspective for developers. You will get to understand what exactly this problem is about and why it exists in the first place. Moreover, we will go through the possible solutions, each one of them presented with pros and cons. At the end of this talk, you should be able to evaluate which solution best suits your app, and even if you need a solution in the first place.
This document provides an overview of Docker containers and developer workflows using Docker. It defines containers and images, and explains how Docker abstracts machine-specific settings to allow containers to run on different machines. Popular Docker images are listed, and benefits of using Docker for development are outlined. Common Docker commands are also described.
Decrease build time and application sizeKeval Patel
This is the presentation of the talk I gave in the MAD meetup on 15th April. This talk basically explains different tricks & tweaks to decrease your application size and your Gradle build time.
If you have any queries or any feedback, hit me on twitter: https://twitter.com/kevalpatel2106
Containers Roadshow: How to Develop Containers for the EnterpriseHonza Horák
Introduction of how we do Docker containers development in Red Hat. The talk shares some best practices and gotchas that we realized during databases packaging as linux containers.
Android is an open source software platform and operating system for mobile devices based on the Linux kernel. It allows developers to write managed code in the Java programming language. The Android platform was developed by Google and the Open Handset Alliance. The document discusses the Android platform, software development tools, key components and APIs, building blocks like activities and services, different layouts, and the activity lifecycle.
Creating Developer-Friendly Docker Containers with ChaperoneGary Wisniewski
The document discusses creating developer-friendly containers using Chaperone and the chaperone-baseimage family. Chaperone is a process manager that provides services like logging, cron jobs, and orderly shutdown within containers. The chaperone-baseimage images use Chaperone to provide three personalities for containers: closed, attached-data, and development. This allows developers to have a consistent environment to develop applications without understanding container internals. The development model mounts the container's infrastructure to the developer's local directory for easy editing of code and data outside the container.
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...Felipe Prado
This document provides documentation for the r2c analysis platform and command line interface (CLI). It describes how to install and set up the r2c CLI, create an example analyzer, write analysis code using Python, run the analyzer locally on a test codebase, and publish the analyzer to the r2c platform to run at larger scale. The example analyzer counts the percentage of whitespace in JavaScript files to identify potentially minified code. The document guides the reader through each step of developing and testing an analyzer locally before publishing it for cloud-based analysis.
The document provides tips for Android development. It recommends using RelativeLayout over LinearLayout to improve performance. It also recommends using the Hierarchy Viewer tool to analyze layouts and identify potential performance issues. Additional tips include using keyboard shortcuts effectively in Eclipse, using LogCat to debug problems, and properly configuring and testing applications before publishing.
This document discusses application delivery in a container world. It summarizes using Docker from development to production, including local development, continuous integration, deploying to servers using schedulers like Kubernetes and ECS, service discovery using tools like Consul, and updating applications safely using blue-green deployments and feature toggling. It then demonstrates these concepts using Docker, AWS ECS, Consul, and Consul Template to deploy a voting application.
The document provides an introduction to C++.NET Windows Forms course. It outlines topics that will be covered including OOP concepts in .NET, C++.NET console programming, debugging, Windows forms controls, drawing, collections, event handling, exception handling, file processing, and dynamic controls. It also provides brief introductions and overviews of the .NET framework, languages and tools, common language runtime, base class libraries, and Visual Studio.
DCEU 18: Developing with Docker ContainersDocker, Inc.
Laura Frank Tacho - Director of Engineering, CloudBees
Wouldn't it be great for a new developer on your team to have their dev environment totally set up on their first day? What about having the confidence that your dev environment mirrors testing and prod? Containers enable this to become reality, along with other great benefits like keeping dependencies nice and tidy and making packaged code easier to share. Come learn about the ways containers can help you build and ship software easily, and walk away with two actionable steps you can take to start using Docker containers for development.
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Patrick Chanezon
This document provides an overview of developing and deploying Java applications on Azure using Docker. It discusses using Docker to build Java applications, running containers, and deploying stacks. It also covers Docker Enterprise Edition, including subscriptions, certifications, and security features. Finally, it demonstrates using Docker on Azure, such as with Azure Container Service, and shows examples of building, running, and deploying Java applications with Docker.
Slides that were presented during the webrtc Qt Cmake tutorial at IIT-RTC in October 2017 in Chicago. The slides are not yet complete, and will be updated later.
Similar to The Road To Single Dex (GDG San Francisco Meetup) (20)
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
2. Motivation
• Yammer is a social networking service used for
communication within an organization
• 3 APKs: Min SDK 15, 16 and 19, Target SDK 26
• Loading extra DEX files may lead to possible ANRs
• Multidex makes very large memory allocation requests may
crash during run time
4. Results
1 DEX file, Smaller APK, All features kept!
Before After Reduction
Method Count 85k+ 60.8k 28.47%
APK Size 10.7MB+ 7.1MB 33.64%
5. What makes an APK so big?
Multiple DEX files
+
Many Resources
6. What is inside an APK?
• AndroidManifest.xml
• assets/
• classes.dex
• META-INF/
- CERT.SF
- MANIFEST.MF
- CERT.RSA
• lib/
• res/
- drawable/
- layout/
• resources.arsc
7. Big APKs - DEX size
• Remove all/any dead code
• Remove any old/unused libraries
• Refactor out large/non-mobile libraries
• Verify Gradle configurations
8. Big APKs - Resources
• Remove extra and unused files in your “/res” folder
• Remove extra and used files in your “/assets” folder
9. Before Optimizations - Debug build
$ gradlew countDebugDexMethods sizeDebugApk
> Task :countDebugDexMethods
Total methods in debug.apk: 113007 (172.44% used)
Total fields in debug.apk: 50547 (77.13% used)
Methods remaining in debug.apk: 0
Fields remaining in debug.apk: 14988
> Task :sizeDebugApk
Total APK Size in debug.apk in bytes: 12386152 (12.3MB)
10. Before Optimizations - Release build
$ gradlew countReleaseDexMethods sizeReleaseApk (with Proguard)
> Task :countReleaseDexMethods
Total methods in release.apk: 85259 (130.10% used)
Total fields in release.apk: 39887 (60.86% used)
Methods remaining in release.apk: 0
Fields remaining in release.apk: 25648
> Task :sizeReleaseApk
Total APK Size in release.apk in bytes: 10764242 (10.7MB)
13. Trimming the DEX size - Dead Code
• Remove any and all unused code
- PMD - Comes with Gradle
- Proguard - Comes with Android Gradle Plugin
- Intellij/Android Studio Inspections - Click “Analyze” > Click “Inspect Code…”
• Remove all unused libraries
- We chose HockeyApp over an open source analytics library called ApplicationInsights
- HockeyApp’s functionality encompasses all of the functionality that we need from
ApplicationInsights
14. Trimming the DEX size - Old Libraries
• Remove old libraries
- Using HockeyApp for releasing versioning/nightlies - Allowed us to remove AndroidQuery - version
checking
• Remove unnecessary libraries
- Try not add libraries that duplicate Android’s existing functionality
- Able to remove Apache Commons validator - validate emails addresses
• Removing differential versions of same library
- Jackson 1 and Jackson 2 are the same library but Jackson 2 has a different package name
- Duplicating functionality across across prevent tools such as Proguard from optimizing
15. Trimming the DEX size - Transitive Libraries
• Watch out for Library Duplication
- Jackson 1 vs Jackson 2 vs Gson
- Consider using a Groovy map in your build.gradle
• Bringing in extra libraries based on a libraries’ dependencies
- Use “gradlew dependencies” to see what you are actually using
18. Trimming the DEX size - Large Libraries
• Try not to use Large/Non-mobile libraries
- Guava - 15k+ methods
- Jackson2 2.9.0.pr3 - 12k+ methods
- Check size of libraries with methodscount.com
• Necessary Evils
- AppCompat - 25.4.0 has 16.5k+ methods, 26.0.0-beta2 has 18.3k+ (continues to increase)
- Google Play Services GCM 11.0.0 - 16.7k+ methods
- Simply using both App Compat + Play Services together brings your APK to 30k+ methods,
halfway to the 64k limit per DEX file!
19. Trimming the DEX size - MethodsCount
methodscount.com/?lib=com.android.support:appcompat-v7:24.2.1
20. Trimming the DEX size - Gradle Configurations
dependencies {
compile project(":common")
compile project(":common-test")
}
Pre Android Gradle Plugin 3.0
21. Trimming the DEX size - Gradle Configurations
dependencies {
compile project(":common")
compile project(":common-test")
}
Pre Android Gradle Plugin 3.0
22. Trimming the DEX size - Gradle Configurations
Pre Android Gradle Plugin 3.0
dependencies {
compile project(":common")
testCompile project(":common-test")
}
23. Trimming the DEX size - Gradle Configurations
dependencies {
implementation project(":common")
testImplementation project(":common-test")
}
With Android Gradle Plugin 3.0
24. Trimming the DEX size - Proguard
• Use Proguard on Release builds
- Set “minifyEnabled” to true!
- Easiest way to help lower your DEX size
• Consider using “proguard-android-optimize.txt” over
“proguard-android.txt”
- Proguard will make 5 optimization passes on your code
25. Trimming the DEX size - Proguard
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
Make sure you turn on “minifyEnabled”
26. Trimming the DEX size - Proguard
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
Make sure you turn on “minifyEnabled”
27. Trimming the DEX size - Proguard
Make sure you provide Proguard rules
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
28. Trimming the DEX size - Proguard
Try using more aggressive Proguard rules
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android-optimize.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
29. Trimming the DEX size - Proguard
• Remove extra Proguard rules
• Keep them up to date with the current libraries in your app
• Make sure to use “-keep” sparingly
30. Trimming the DEX size - Proguard
Over using “-keep” can be costly
-keep class okhttp3.* { ; }
-keep interface okhttp3.* { ; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
31. Trimming the DEX size - Proguard
Over using “-keep” can be costly
-keep class okhttp3.* { ; }
-keep interface okhttp3.* { ; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
32. Trimming the DEX size - Proguard
Try and let Proguard decide
-dontwarn okhttp3.**
-dontnote okhttp3.**
34. Trimming the Resources - Lint
• Make sure to use lint to check for “UnusedResources”
• Do not suppress this lint rule unless you are writing an
Android library
• Consider failing the builds based on lint warnings/errors
36. Trimming the Resources - Lint
android {
lintOptions {
error "UnusedResources"
}
}
Less strict, check for “UnusedResources”
37. Trimming the Resources - ShrinkResources
• What Lint does not find, you have to remove manually
• Remove all unused resources in “assets/” folder
- Raw media such as Font files
• Use “shrinkResources” to remove unused resources
- Great for removing library dependencies resources in your final APK
41. Trimming the Resources - ResConfigs
• Use “resConfigs” to filter out localizations that you do not
want/support in your app
42. Trimming the Resources - ResConfig
Using “resConfigs” to keep multiple resources or languages
android {
defaultConfig {
resConfigs "en"
}
}
43. Trimming the Resources - ResConfig
Using “resConfigs” to keep multiple languages
android {
defaultConfig {
resConfigs "en","de","fr"
}
}
44. Trimming the Resources - PackagingOptions
• Remove extra files that are baked into your APK
• Use the APK Analyzer to find these files
- In Android Studio, Click “Build” > Click “Analyze APK…”
• Use “packagingOptions” to filter out these files
45. Trimming the Resources - PackagingOptions
android {
packagingOptions {
exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt"
}
}
Common “packagingOptions” excludes
46. Trimming the Resources - PackagingOptions
After using common “packagingOptions” excludes
48. Trimming the Resources - PackagingOptions
After using stricter “packagingOptions” excludes
49. Trimming the Resources - Vector Drawables
• Consider converting simple PNGs to “Vector” Drawables
• Single XML file is smaller than multiple PNGs
• Use tools such as “svg2android” to convert SVGs to Android
Vector Drawables
53. Trimming the Resources - Vector Drawables
After dropping your SVG file, Copy it to your project in “res/drawable”
54. Trimming the Resources - Vector Drawables
Make sure to use “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/hello"/>
</LinearLayout>
55. Trimming the Resources - Vector Drawables
Make sure to use “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/hello"/>
</LinearLayout>
56. Trimming the Resources - Vector Drawables
Using “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
app:srcCompat="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
app:srcCompat="@drawable/hello"/>
</LinearLayout>
57. Trimming the Resources - WebP
• Reduces image sizes by converting to WebP
• Does not need to compress at build time(PNG crunching)
• By converting beforehand, this will help speed up your build
58. Trimming the Resources - WebP
Right-click on “drawable” folders, click on “Convert to WebP”
59. After Optimizations - Debug build
$ gradlew countDebugDexMethods sizeDebugApk
> Task :countDebugDexMethods
Total methods in debug.apk: 100595 (153.50% used)
Total fields in debug.apk: 51278 (78.25% used)
Methods remaining in debug.apk: 0
Fields remaining in debug.apk: 14257
> Task :sizeDebugApk
Total APK Size in debug.apk in bytes: 10053036 (10.1MB)
60. After Optimizations - Release build
$ gradlew countReleaseDexMethods sizeReleaseApk (with Proguard)
> Task :countReleaseDexMethods
Total methods in release.apk: 60810 (92.79% used)
Total fields in release.apk: 29445 (44.93% used)
Methods remaining in release.apk: 4725
Fields remaining in release.apk: 36090
> Task :sizeReleaseApk
Total APK Size in release.apk in bytes: 7049930 (7.1MB)
62. Before vs After Release Builds
1 DEX file, Smaller APK, All features kept!
Before After Reduction
Method Count 85k+ 60.8k 28.47%
APK Size 10.7MB+ 7.1MB 33.64%