Fixed
Status Update
Comments
st...@gmail.com <st...@gmail.com> #2
Hmm
I can repro on API 33 but not on API 34
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #3
Can't repro with API 24 as well.
jb...@google.com <jb...@google.com> #4
Can't repro with 21 or 32. Looks like issue is specific to API 33.
pr...@google.com <pr...@google.com> #5
And seems to have nothing to do with ByteBuffer.
fun testCpu() {
val random = Random(Date().time)
val nanoTime = measureNanoTime {
repeat(100_000) {
sin(random.nextDouble())
}
}
Log.d("SinTest", "100_000 * sin() loop took ${TimeUnit.NANOSECONDS.toMillis(nanoTime)}ms")
}
Results in:
2023-08-02 11:32:07.506 9391-9391 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 9ms
2023-08-02 11:32:08.417 9391-9391 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 2ms
2023-08-02 11:32:09.296 9391-9391 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 1ms
2023-08-02 11:32:09.992 9391-9391 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 1ms
2023-08-02 11:32:10.720 9391-9391 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 1ms
---------------------------- PROCESS ENDED (9391) for package com.alonalbert.myapplication ----------------------------
---------------------------- PROCESS STARTED (9463) for package com.alonalbert.myapplication ----------------------------
2023-08-02 11:32:27.663 9463-9463 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 78ms
2023-08-02 11:32:28.537 9463-9463 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 105ms
2023-08-02 11:32:29.262 9463-9463 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 103ms
2023-08-02 11:32:29.887 9463-9463 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 104ms
2023-08-02 11:32:30.663 9463-9463 SinTest com.alonalbert.myapplication D 100_000 * sin() loop took 104ms
eb...@gmail.com <eb...@gmail.com> #6
I can reproduce without Android Studio in the loop at all.
Do the following on an API 33 device or emulator, then on any other API level.
$ adb install -r slow-under-debugger.apk
$ # Start the app and observe
$ adb jdwp
14051
^C
$ adb forward tcp:5005 jdwp:14051
$ jdb -attach hostname=localhost,port=5005
$ Observe the app
On a API 33 device, the execution time jumps by a factor of about 50 when it's attached to the debugger.Note that when the debugger is detached, it returns to normal.
Description
Component used: Navigation
Version used: 2.8.0-beta02
Devices/Android versions reproduced on: VanillaIceCream(AP31.240426.023.B4) with Predictive back in developer options turned on
With a new project generated from Android Studio, I added
android:enableOnBackInvokedCallback="true"
and I bumped all dependencies to the latest available, where the relevant ones are:Then MainActivity looks like this:
And doing this interaction:
Noticed this bug as I could not longer navigate in my codebase since I got my nav events wrapped in
dropUnlessResumed {}
which at that point means you're dropping all of those those.