Coding for Life--Battery Life, That Is discusses how to optimize Android apps to be more battery efficient. It recommends using efficient data formats and parsers for network requests, gzipping text data, limiting wakelocks and location updates, recycling objects, and using coarse location services rather than GPS where possible. It also suggests starting background services through AlarmManager or manifest receivers rather than continuously running services, and giving users options to control background behavior and data usage to maximize battery life.
Doze mode is just around the corner. Introduced in Marshmallow, as the shy guy that was allowed to step in only when your device went to sleep. ZzzZzzzz With the new N release, Doze mode becomes the rockstar. He rushes into the room with a big shabang by shooting all background services and network requests that forgot to get away. He should no longer be shy. He just shoots and dances on bones of your scheduled alarms, while you wonder why this particular task is no longer running. With the new Doze mode, you require to adapt your app architecture to the new reality. On this talk, we will learn how to survive Doze mode using Job Scheduler and stay in one piece.
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Big Data Spain
BigDL is a deep learning framework modeled after Torch and open-sourced by Intel in 2016. BigDL runs on Apache Spark, a fast, general, distributed computing platform that is widely used for Big Data processing and machine learning tasks.
https://www.bigdataspain.org/2017/talk/deep-learning-in-spark-with-bigdl
Big Data Spain 2017
16th -17th November Kinépolis Madrid
Doze mode is just around the corner. Introduced in Marshmallow, as the shy guy that was allowed to step in only when your device went to sleep. ZzzZzzzz With the new N release, Doze mode becomes the rockstar. He rushes into the room with a big shabang by shooting all background services and network requests that forgot to get away. He should no longer be shy. He just shoots and dances on bones of your scheduled alarms, while you wonder why this particular task is no longer running. With the new Doze mode, you require to adapt your app architecture to the new reality. On this talk, we will learn how to survive Doze mode using Job Scheduler and stay in one piece.
Deep Learning in Spark with BigDL by Petar Zecevic at Big Data Spain 2017Big Data Spain
BigDL is a deep learning framework modeled after Torch and open-sourced by Intel in 2016. BigDL runs on Apache Spark, a fast, general, distributed computing platform that is widely used for Big Data processing and machine learning tasks.
https://www.bigdataspain.org/2017/talk/deep-learning-in-spark-with-bigdl
Big Data Spain 2017
16th -17th November Kinépolis Madrid
Unconference / niekonferencja to prosta metoda aby zaangażować uczestników spotkań i przyśpieszyć wymianę wiedzy i networking. Prezentacja pochodzi z Kongresu Bibliotek Publicznych "Cała naprzód".
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.
Android devices running on battery need to be optimized for power.
When taking a look at the CPU this optimization starts typically with the race to idle, meaning to go to finish the workload as fast as possible. However typical Android devices are running on a SoC with many other parts like GPU, hardware decoders, sensors, 2G/3G/4G/Wifi modules...
All these parts need to be optimized to reduce the power consumption, but the biggest part of the problem/solution are applications themselves.
Guessing what software is actually causing high power consumption and mitigating it aren't simple tasks. In this session You will explore typical causes of high power consumption, how to debug them and provide possible solutions.
Android provides a number of APIs, OS tricks, and developer tools around power consumption, you will also get to know, learn, and understand them through this talk.
The aim of this report is to introduce developers to the world of Magento optimization, giving suggestions and practical examples of the best practices to apply.
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleSean Zhong
Gearpump is a Akka based realtime streaming engine, it use Actor to model everything. It has super performance and flexibility. It has performance of 18000000 messages/second and latency of 8ms on a cluster of 4 machines.
This PPT presentation will explain you how you can reduce the battery optimization for Android Phones. It show you step by step process to reduce consumption of battery while using your application
Android Pro Tips - IO 13 reloaded EventRan Nachmany
These are the slides I used in my PrtoTip trilogy talk during IO #13 Reloaded GDG meetup (http://www.meetup.com/GDG-Herzeliya/events/121409372/).
It covers a broad range of Android development tips.
Unconference / niekonferencja to prosta metoda aby zaangażować uczestników spotkań i przyśpieszyć wymianę wiedzy i networking. Prezentacja pochodzi z Kongresu Bibliotek Publicznych "Cała naprzód".
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.
Android devices running on battery need to be optimized for power.
When taking a look at the CPU this optimization starts typically with the race to idle, meaning to go to finish the workload as fast as possible. However typical Android devices are running on a SoC with many other parts like GPU, hardware decoders, sensors, 2G/3G/4G/Wifi modules...
All these parts need to be optimized to reduce the power consumption, but the biggest part of the problem/solution are applications themselves.
Guessing what software is actually causing high power consumption and mitigating it aren't simple tasks. In this session You will explore typical causes of high power consumption, how to debug them and provide possible solutions.
Android provides a number of APIs, OS tricks, and developer tools around power consumption, you will also get to know, learn, and understand them through this talk.
The aim of this report is to introduce developers to the world of Magento optimization, giving suggestions and practical examples of the best practices to apply.
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleSean Zhong
Gearpump is a Akka based realtime streaming engine, it use Actor to model everything. It has super performance and flexibility. It has performance of 18000000 messages/second and latency of 8ms on a cluster of 4 machines.
This PPT presentation will explain you how you can reduce the battery optimization for Android Phones. It show you step by step process to reduce consumption of battery while using your application
Android Pro Tips - IO 13 reloaded EventRan Nachmany
These are the slides I used in my PrtoTip trilogy talk during IO #13 Reloaded GDG meetup (http://www.meetup.com/GDG-Herzeliya/events/121409372/).
It covers a broad range of Android development tips.
Scaling Experimentation & Data Capture at GrabRoman
This is the slides from the presentation I gave at the Data Science Meetup Hamburg. This talks about how we build and scaled our online experimentation platform and associated event capture system.
What are some of the performance implications of using lambdas and what strategies can be used to address these. When might be want an alternative to using a lambda and how can we design our APIs to be flexible in this regard. What are the principles of writing low latency code in Java? How do we tune and optimize our code for low latency? When don’t we optimize our code? Where does the JVM help and where does it get in our way? How does this apply to lambdas? How can we design our APIs to use lambdas and minimize garbage?
Dataservices: Processing (Big) Data the Microservice WayQAware GmbH
Apache Big Data 2017, Miami (Florida/USA): Talk by Josef Adersberger (@adersberger, CTO at QAware)
Abstract:
We see a big data processing pattern emerging using the Microservice approach to build an integrated, flexible, and distributed system of data processing tasks. We call this the Dataservice pattern. In this presentation we'll introduce into Dataservices: their basic concepts, the technology typically in use (like Kubernetes, Kafka, Cassandra and Spring) and some architectures from real-life.
This plugin lets you track your phone and maintain inventory information of your Windows mobile equipments using PandoraFMS Enterprise. For more information you can visit the following website: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=313
One of the biggest issues for a developer – whether they are an engineer at an OEM or working for a mobile AI application startup – is that their apps are at the mercy of pre-set power and performance settings as defined by OEMs or Silicon vendors. So how can a developer break through that barrier when it seems their hands are tied behind their backs? The Snapdragon Power Optimization SDK allows developers to control the CPU and GPU frequency much more finely from their own application logic. This provides developers with more control within the bounds of the power/thermal framework.
Similar to W 0300 codingfor_life-batterylifethatis (20)
You could be a professional graphic designer and still make mistakes. There is always the possibility of human error. On the other hand if you’re not a designer, the chances of making some common graphic design mistakes are even higher. Because you don’t know what you don’t know. That’s where this blog comes in. To make your job easier and help you create better designs, we have put together a list of common graphic design mistakes that you need to avoid.
Expert Accessory Dwelling Unit (ADU) Drafting ServicesResDraft
Whether you’re looking to create a guest house, a rental unit, or a private retreat, our experienced team will design a space that complements your existing home and maximizes your investment. We provide personalized, comprehensive expert accessory dwelling unit (ADU)drafting solutions tailored to your needs, ensuring a seamless process from concept to completion.
Transforming Brand Perception and Boosting Profitabilityaaryangarg12
In today's digital era, the dynamics of brand perception, consumer behavior, and profitability have been profoundly reshaped by the synergy of branding, social media, and website design. This research paper investigates the transformative power of these elements in influencing how individuals perceive brands and products and how this transformation can be harnessed to drive sales and profitability for businesses.
Through an exploration of brand psychology and consumer behavior, this study sheds light on the intricate ways in which effective branding strategies, strategic social media engagement, and user-centric website design contribute to altering consumers' perceptions. We delve into the principles that underlie successful brand transformations, examining how visual identity, messaging, and storytelling can captivate and resonate with target audiences.
Methodologically, this research employs a comprehensive approach, combining qualitative and quantitative analyses. Real-world case studies illustrate the impact of branding, social media campaigns, and website redesigns on consumer perception, sales figures, and profitability. We assess the various metrics, including brand awareness, customer engagement, conversion rates, and revenue growth, to measure the effectiveness of these strategies.
The results underscore the pivotal role of cohesive branding, social media influence, and website usability in shaping positive brand perceptions, influencing consumer decisions, and ultimately bolstering sales and profitability. This paper provides actionable insights and strategic recommendations for businesses seeking to leverage branding, social media, and website design as potent tools to enhance their market position and financial success.
7 Alternatives to Bullet Points in PowerPointAlvis Oh
So you tried all the ways to beautify your bullet points on your pitch deck but it just got way uglier. These points are supposed to be memorable and leave a lasting impression on your audience. With these tips, you'll no longer have to spend so much time thinking how you should present your pointers.
Can AI do good? at 'offtheCanvas' India HCI preludeAlan Dix
Invited talk at 'offtheCanvas' IndiaHCI prelude, 29th June 2024.
https://www.alandix.com/academic/talks/offtheCanvas-IndiaHCI2024/
The world is being changed fundamentally by AI and we are constantly faced with newspaper headlines about its harmful effects. However, there is also the potential to both ameliorate theses harms and use the new abilities of AI to transform society for the good. Can you make the difference?
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Mansi Shah
This study examines cattle rearing in urban and rural settings, focusing on milk production and consumption. By exploring a case in Ahmedabad, it highlights the challenges and processes in dairy farming across different environments, emphasising the need for sustainable practices and the essential role of milk in daily consumption.
Unleash Your Inner Demon with the "Let's Summon Demons" T-Shirt. Calling all fans of dark humor and edgy fashion! The "Let's Summon Demons" t-shirt is a unique way to express yourself and turn heads.
https://dribbble.com/shots/24253051-Let-s-Summon-Demons-Shirt
2. Coding for Life--Battery
Life, That Is
Jeff Sharkey
May 27, 2009
Post your questions for this talk on Google Moderator:
code.google.com/events/io/questions
3. Why does this matter?
Phones primarily run on battery power, and each device
has a "battery budget"
When it's gone, it's gone
Apps need to work together to be good citizens of that
shared resource
Current measured in mA, battery capacity in mAh
HTC Dream: 1150mAh
HTC Magic: 1350mAh
Samsung I7500: 1500mAh
Asus Eee PC: 5800mAh
4. Where does it all go?
Source: Values measured using an industrial power
monitor at 5kHz sampling rate, and taking average
power with lowest standard deviation.
5. Where does it all go?
How do these numbers add up in real life?
Watching YouTube: 340mA = 3.4 hours
Browsing 3G web: 225mA = 5 hours
Typical usage: 42mA average = 32 hours
EDGE completely idle: 5mA = 9.5 days
Airplane mode idle: 2mA = 24 days
6. What costs the most?
Waking up in the background when the phone would
otherwise be sleeping
App wakes up every 10 minutes to update
Takes about 8 seconds to update, 350mA
Cost during a given hour:
3600 seconds * 5mA = 5mAh resting
6 times * 8 sec * 350 mA = 4.6mAh updating
Just one app waking up can trigger cascade
7. What costs the most?
Bulk data transfer such as a 6MB song:
EDGE (90kbps): 300mA * 9.1 min = 45 mAh
3G (300kbps): 210mA * 2.7 min = 9.5 mAh
WiFi (1Mbps): 330mA * 48 sec = 4.4 mAh
Moving between cells/networks
Radio ramps up to associate with new cell
BroadcastIntents fired across system
Parsing textual data, regex without JIT
9. How can we do better?
Networking
Check network connection, wait for 3G or WiFi
ConnectivityManager mConnectivity;
TelephonyManager mTelephony;
// Skip if no connection, or background data disabled
NetworkInfo info = mConnectivity.getActiveNetworkInfo();
if (info == null ||
!mConnectivity.getBackgroundDataSetting()) {
return false;
}
10. How can we do better?
Networking
Check network connection, wait for 3G or WiFi
// Only update if WiFi or 3G is connected and not roaming
int netType = info.getType();
int netSubtype = info.getSubtype();
if (netType == ConnectivityManager.TYPE_WIFI) {
return info.isConnected();
} else if (netType == ConnectivityManager.TYPE_MOBILE
&& netSubtype == TelephonyManager.NETWORK_TYPE_UMTS
&& !mTelephony.isNetworkRoaming()) {
return info.isConnected();
} else {
return false;
}
11. How can we do better?
Networking
Use an efficient data format and parser
Source: Timings obtained by downloading and
parsing a 6-item RSS feed repeatedly for 60
seconds and averaging results.
12. How can we do better?
Networking
Use an efficient data format and parser
Use "stream" parsers instead of tree parsers
Consider binary formats that can easily mix binary and
text data into a single request
Fewer round-trips to server for faster UX
13. How can we do better?
Networking
Use GZIP for text data whenever possible
Framework GZIP libs go directly to native code , and are
perfect for streams
import java.util.zip.GZIPInputStream;
HttpGet request =
new HttpGet("http://example.com/gzipcontent");
HttpResponse resp =
new DefaultHttpClient().execute(request);
HttpEntity entity = response.getEntity();
InputStream compressed = entity.getContent();
InputStream rawData = new GZIPInputStream(compressed);
14. How can we do better?
Networking
Use GZIP for text data whenever possible
Source: Timings averaged over multiple trials of
downloading 1800-item RSS feed of textual data.
16. How can we do better?
Foreground apps
Wakelocks are costly if forgotten
Pick the lowest level possible, and use specific
timeouts to work around unforseen bugs
Consider using android:keepScreenOn to ensure
correctness
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:keepScreenOn="true">
17. How can we do better?
Foreground apps
Recycle Java objects, especially complex objects
Yes, we have a GC, but usually better to just create
less garbage that it has to clean up
XmlPullParserFactory and BitmapFactory
Matcher.reset(newString) for regex
StringBuilder.setLength(0)
Watch for synchronization issues, but can be safe when
driven by UI thread
Recycling strategies are used heavily in ListView
18. How can we do better?
Foreground apps
Use coarse network location, it's much cheaper
GPS: 25 seconds * 140mA = 1mAh
Network: 2 seconds * 180mA = 0.1mAh
1.5 uses AGPS when network available
GPS time-to-fix varies wildly based on environment, and
desired accuracy, and might outright fail
Just like wake-locks, location updates can continue
after onPause(), so make sure to unregister
If all apps unregister correctly, user can leave GPS
enabled in Settings
19. How can we do better?
Foreground apps
Floating point math is expensive
Using microdegrees when doing bulk geographic math
// GeoPoint returns value 37392778, -122041944
double lat = GeoPoint.getLatitudeE6() / 1E6;
double lon = GeoPoint.getLongitudeE6() / 1E6;
Caching values when doing DPI work with
DisplayMetrics
float density =
getResources().getDisplayMetrics().density;
int actualWidth =
(int)(bitmap.getWidth() * density);
20. How can we do better?
Foreground apps
Accelerometer/magnetic sensors
Normal: 10mA (used for orientation detection)
UI: 15mA (about 1 per second)
Game: 80mA
Fastest: 90mA
Same cost for accelerometer, magnetic, orientation
sensors on HTC Dream
22. How can we do better?
Background apps
Services should be short-lived; these aren't daemons
Each process costs 2MB and risks being
killed/restarted as foreground apps need memory
Otherwise, keep memory usage low so you're not the
first target
Trigger wake-up through AlarmManager or with <receiver>
manifest elements
stopSelf() when finished
23. How can we do better?
Background apps
Start service using AlarmManager
Use the _WAKEUP flags with caution
App that updates every 30 minutes, but only when
device is already awake
AlarmManager am = (AlarmManager)
context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, MyService.class);
PendingIntent pendingIntent =
PendingIntent.getService(context, 0, intent, 0);
long interval = DateUtils.MINUTE_IN_MILLIS * 30;
long firstWake = System.currentTimeMillis() + interval;
am.setRepeating(AlarmManager.RTC,
firstWake, interval, pendingIntent);
24. How can we do better?
Background apps
Use setInexactRepeating() so the system can bin your
update together with others
25. How can we do better?
Background apps
Start your service using <receiver> in manifest
Intent.ACTION_TIMEZONE_CHANGED
ConnectivityManager.CONNECTIVITY_ACTION
Intent.ACTION_DEVICE_STORAGE_LOW
Intent.ACTION_BATTERY_LOW
Intent.ACTION_MEDIA_MOUNTED
<receiver android:name=".ConnectivityReceiver">
<intent-filter>
<action android:name=
"android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
26. How can we do better?
Background apps
Dynamically enabling/disabling <receiver> components in
manifest, especially when no-ops
<receiver android:name=".ConnectivityReceiver"
android:enabled="false">
...
</receiver>
ComponentName receiver = new ComponentName(context,
ConnectivityReceiver.class);
PackageManager pm = context.getPackageManager();
pm.setComponentEnabledSetting(receiver,
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
27. How can we do better?
Background apps
Checking current battery and network state before running
a full update
public void onCreate() {
// Register for sticky broadcast and send default
registerReceiver(mReceiver, mFilter);
mHandler.sendEmptyMessageDelayed(MSG_BATT, 1000);
}
IntentFilter mFilter =
new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
BroadcastReceiver mReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
// Found sticky broadcast, so trigger update
unregisterReceiver(mReceiver);
mHandler.removeMessages(MSG_BATT);
mHandler.obtainMessage(MSG_BATT, intent).sendToTarget();
}
};
29. Users will be watching!
SpareParts has "Battery history"
1.5 is already keeping stats on
which apps are using CPU,
network, wakelocks
Simplified version coming in
future, and users will uninstall
apps that abuse battery
Consider giving users options for
battery usage, like update intervals,
and check the "no background data"
flag
30. Takeaways
Use an efficient parser and GZIP to make best use of
network and CPU resources
Services that sleep or poll are bad, use <receiver> and
AlarmManager instead
Disable manifest elements when no-op
Wake up along with everyone else (inexact alarms)
Wait for better network/battery for bulk transfers
Give users choices about background behavior
31. Q&A
Post your questions for this talk on Google Moderator:
code.google.com/events/io/questions