Remember, it is a good practice to use ‘yield’ in suspend functions, between blocks of non-suspended CPU-intensive or time-intensive operations. Learn more from the article by Marcin Moskala.
Kt. Academy’s Post
More Relevant Posts
-
It took me many days of experiments, but I finally finished what is likely one of the most important articles in my career. Welcome "How many threads your network client uses?". What is it about? After discovering that Retrofit wastes threads for network calls, I made experiments to check different popular network clients used in Kotlin to establish how they use threads. On the way, I discovered some of their problems.
How many threads your network client uses?
kt.academy
To view or add a comment, sign in
-
In Android development, mastering memory management is crucial for building high-quality and efficient applications. One of the fundamental concepts to grasp is the interplay between memory leaks and garbage collection. checkout my new blog about this from the learn android from basic to advance series https://lnkd.in/dU-MBamS #android #androidappdevelopment #mobileappdevelopement #memoryleak #garbagecollection #blog #hashnode
Topic: 6 Deeply Understand Memory Leaks and Garbage Collection
mayursinhdevblog.hashnode.dev
To view or add a comment, sign in
-
Picasso is now being deprecated as announced by the legend Jake Wharton! Picasso was a benchmark for what an Image Loading Library should be and also helped so many of us, learn about Bitmap pooling, image downloading, caching, RAM management etc And most importantly, helped tackle the system design question "Design an Image Loading Library" Jokes Aside, Coil is a brilliant alternative which is purely Kotlin and coroutines. Do take a look if you're migrating https://lnkd.in/dN5GyJFY
To view or add a comment, sign in
-
It took me many days of experiments, but I finally finished what is likely one of the most important articles in my career. Welcome "How many threads your network client uses?". What is it about? After discovering that Retrofit wastes threads for network calls, I made experiments to check different popular network clients used in Kotlin to establish how they use threads. On the way, I discovered some of their problems.
How many threads your network client uses?
kt.academy
To view or add a comment, sign in
-
Android's use of safe-by-design principles drives our adoption of memory-safe languages like Rust, making exploitation of the OS increasingly difficult with every release. To provide a secure foundation, we’re extending hardening and the use of memory-safe languages to low-level firmware (including in Trusty apps). In this blog post, we'll show you how to gradually introduce Rust into your existing firmware, prioritizing new code and the most security-critical code. You'll see how easy it is to boost security with drop-in Rust replacements, and we'll even demonstrate how the Rust toolchain can handle specialized bare-metal targets. Drop-in Rust replacements for C code are not a novel idea and have been used in other cases, such as librsvg’s adoption of Rust which involved replacing C functions with Rust functions in-place. We seek to demonstrate that this approach is viable for firmware, providing a path to memory-safety in an efficient and effective manner.
Deploying Rust in Existing Firmware Codebases
security.googleblog.com
To view or add a comment, sign in
-
Here I go again.🚀🚀 It's time to publish the 4th part of the SOLID with Kotlin article. Now let's talk about the Interface Segregation Principle and the importance of creating specific interfaces, leaving aside those interfaces with different methods that it doesn't make sense for every class to implement.
Usability of SOLID Principles with Kotlin - Interface Segregation Principle: Part 4
thallesvieira.com
To view or add a comment, sign in
-
Hey guys! I made a new post on Medium. This time, I will explain about threads in Node.js. The idea behind it, the misconception about this subject in this JS runtime, and a straightforward example.
Threads in Node.js
link.medium.com
To view or add a comment, sign in
-
What I'm asking is how I can change what will show up, when I use long press of the power button. U Check it out: https://lnkd.in/dA7mb_SG Join the conversation! #android #androidstudio #java
how to override power button in android device
https://querifyquestion.com
To view or add a comment, sign in
-
Understanding of memory alocation will make you rethink on the order of declaring variables
⚡ Why do the 𝘀𝗮𝗺𝗲 Go structs have 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗺𝗲𝗺𝗼𝗿𝘆 𝘂𝘀𝗮𝗴𝗲? 𝘞𝘩𝘢𝘵'𝘴 𝘵𝘩𝘦 𝘤𝘢𝘵𝘤𝘩? The order of struct filed in golang impacts memory and can lead to a waste of memory if not set properly... To understand how the ordering of fields impacts memory usage, we need to dive into the concepts of memory alignment and padding. 🧠 𝗠𝗲𝗺𝗼𝗿𝘆 𝗮𝗹𝗶𝗴𝗻𝗺𝗲𝗻𝘁 is a technique that optimizes data access by ensuring that data is aligned to specific byte boundaries, which most modern CPUs are designed to handle more efficiently. 📏 𝗣𝗮𝗱𝗱𝗶𝗻𝗴 is extra space added by the compiler to align data structures in memory, and if not managed properly, it can result in increased memory usage. 🛠️ 𝗧𝗵𝗲𝗿𝗲 𝗮𝗿𝗲 𝘁𝗼𝗼𝗹𝘀 𝗮𝘃𝗮𝗶𝗹𝗮𝗯𝗹𝗲 𝗳𝗼𝗿 𝗮𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗰 𝘀𝘁𝗿𝘂𝗰𝘁 𝗳𝗶𝗲𝗹𝗱 𝗮𝗹𝗶𝗴𝗻𝗺𝗲𝗻𝘁: - 𝘣𝘦𝘵𝘵𝘦𝘳𝘢𝘭𝘪𝘨𝘯 - 𝘧𝘪𝘦𝘭𝘥𝘢𝘭𝘪𝘨𝘯𝘮𝘦𝘯𝘵 Check them out and integrate them into your Go project to reduce the size of your structs and improve your code! 🤓 More about this: https://lnkd.in/gAfzk4j5 #go #golang
To view or add a comment, sign in
-
I have always believed that you should not use Jetpack Compose stringResource function for retrieving or manipulating strings. However, there is a sample from official source that does exactly that: https://lnkd.in/dxv9EKWE Method lastUpdated on line 483 that returns a String as a Composable function. In my opinion, Composable functions should emit UI and not be used to return text. I still believe that we should not be using stringResource function invocation when it comes to manipulating a String. Why not just have a pure Kotlin method that returns a string resource id in a form of an Integer and then just combine that returned result in the UI layer with stringResource invocation? Which approach do you follow and what is your opinion?
compose-samples/Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/Home.kt at 765c888213ef46d1d98671b671cca9659e783a95 · android/compose-samples
github.com
To view or add a comment, sign in
1,022 followers