Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
as...@google.com <as...@google.com> #2
br...@monzo.com <br...@monzo.com> #3
Yes, kapt incremental compilation support is available since 1.3.40-dev-795
Is there already some plan to add support to Room?
Is there already some plan to add support to Room?
as...@google.com <as...@google.com> #4
#3 incremental kapt is available in 1.3.30 released yesterday too.
br...@monzo.com <br...@monzo.com> #5
Is there already some ETA?
br...@monzo.com <br...@monzo.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4fbb7fb77a4789ab40bff03cc131479779d3e69
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Apr 09 23:20:59 2019
Create integration test for Room that uses gradle test kit.
Useful for testing Room incremental annotation processing in Gradle.
Also consolidated some of the path definitions in various build.gradle
into methods in buildSrc/SupportConfig.
Bug: 112110217
Test: ./gradlew room:integration-tests:room-i-a-p:test
Change-Id: I34f6772675712c6edd500e9149ab7f21ade4f012
M buildSrc/src/main/kotlin/androidx/build/SupportConfig.kt
M lifecycle/integration-tests/incrementality/build.gradle
M navigation/safe-args-gradle-plugin/build.gradle
A room/integration-tests/incremental-annotation-processing/build.gradle
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/AndroidManifest.xml
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestDao.java
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestDatabase.java
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestEntity.java
A room/integration-tests/incremental-annotation-processing/src/test/kotlin/androidx/room/gradle/CompileTest.kt
M settings.gradle
https://android-review.googlesource.com/941741
https://goto.google.com/android-sha1/e4fbb7fb77a4789ab40bff03cc131479779d3e69
Branch: androidx-master-dev
commit e4fbb7fb77a4789ab40bff03cc131479779d3e69
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Apr 09 23:20:59 2019
Create integration test for Room that uses gradle test kit.
Useful for testing Room incremental annotation processing in Gradle.
Also consolidated some of the path definitions in various build.gradle
into methods in buildSrc/SupportConfig.
Bug: 112110217
Test: ./gradlew room:integration-tests:room-i-a-p:test
Change-Id: I34f6772675712c6edd500e9149ab7f21ade4f012
M buildSrc/src/main/kotlin/androidx/build/SupportConfig.kt
M lifecycle/integration-tests/incrementality/build.gradle
M navigation/safe-args-gradle-plugin/build.gradle
A room/integration-tests/incremental-annotation-processing/build.gradle
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/AndroidManifest.xml
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestDao.java
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestDatabase.java
A room/integration-tests/incremental-annotation-processing/src/test/data/simple-project/src/main/java/room/testapp/TestEntity.java
A room/integration-tests/incremental-annotation-processing/src/test/kotlin/androidx/room/gradle/CompileTest.kt
M settings.gradle
na...@google.com <na...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a68222dc929ae5e2a3445f9df69a63636854852e
Author: Hung Nguyen <hungnv@google.com>
Date: Fri Mar 29 11:39:50 2019
Prepare Room for incremental annotation processing.
In Java projects, with non-incremental annotation processing, the inputs
to an annotation processor includes only Java source files.
With incremental annotation processing, however, the inputs may include
both Java source files and class files (to avoid recompiling source
files that haven't changed).
Therefore, all Room annotations need to have retention policy CLASS or
RUNTIME (not SOURCE), so that Room can find the elements annotated with
those annotations from class files. This requirement is also stated at
https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing .
Bug: 112110217
Test: Existing tests + New AnnotationRetentionPolicyTest
Change-Id: I1e3a433bf69503ef15cfc2e53cbe97616a6f13b8
M room/common/api/2.2.0-alpha01.txt
M room/common/api/current.txt
M room/common/build.gradle
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/ForeignKey.java
M room/common/src/main/java/androidx/room/OnConflictStrategy.java
M room/common/src/main/java/androidx/room/Update.java
A room/common/src/test/java/androidx/room/AnnotationRetentionPolicyTest.kt
https://android-review.googlesource.com/958284
https://goto.google.com/android-sha1/a68222dc929ae5e2a3445f9df69a63636854852e
Branch: androidx-master-dev
commit a68222dc929ae5e2a3445f9df69a63636854852e
Author: Hung Nguyen <hungnv@google.com>
Date: Fri Mar 29 11:39:50 2019
Prepare Room for incremental annotation processing.
In Java projects, with non-incremental annotation processing, the inputs
to an annotation processor includes only Java source files.
With incremental annotation processing, however, the inputs may include
both Java source files and class files (to avoid recompiling source
files that haven't changed).
Therefore, all Room annotations need to have retention policy CLASS or
RUNTIME (not SOURCE), so that Room can find the elements annotated with
those annotations from class files. This requirement is also stated at
Bug: 112110217
Test: Existing tests + New AnnotationRetentionPolicyTest
Change-Id: I1e3a433bf69503ef15cfc2e53cbe97616a6f13b8
M room/common/api/2.2.0-alpha01.txt
M room/common/api/current.txt
M room/common/build.gradle
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/common/src/main/java/androidx/room/ForeignKey.java
M room/common/src/main/java/androidx/room/OnConflictStrategy.java
M room/common/src/main/java/androidx/room/Update.java
A room/common/src/test/java/androidx/room/AnnotationRetentionPolicyTest.kt
Description
Jetpack Compose version: I've tested on 1.3.0-alpha01 and 1.2.0-beta03
Jetpack Compose component(s) used: LazyColumn
Android Studio Build: 221.3427.89.2211.8689873
Kotlin version: 1.7.10
Steps to Reproduce or Code Sample to Reproduce:
Context:
We have a rather large (10k+ items) LazyColumn where scrolling (eventually) leads to the application grinding to a halt, constantly trying to free memory. It can't, we just keep getting lots of these:
Background concurrent copying GC freed 51964(1414KB) AllocSpace objects, 6(120KB) LOS objects, 0% free, 190MB/192MB, paused 101us total 1.483s
I took at heap dump at this point and basically all of the heap is used up by instances of
SnapshotMutableStateImpl$StateStateRecord
.Replace LazyColumn with a RecyclerView (with each item being a ComposeView) and the memory leak is gone. App performance is night and day better.
I've been trying for hours to reproduce this in a trivial sample project and haven't had any luck yet. Raising this anyway just in case you have any ideas about what might be causing it. Obviously this makes LazyColumn completely unusable for us, so we'll stick to RecyclerView for now!