Status Update
Comments
ma...@google.com <ma...@google.com>
al...@mercari.com <al...@mercari.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
an...@google.com <an...@google.com> #3
le...@google.com <le...@google.com>
ap...@google.com <ap...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.4.0-alpha02
ch...@gmail.com <ch...@gmail.com> #6
LazyColumn/Row in androidx.compose.foundation:foundation:1.4.0-alpha02 doesn't seem to allow it
changed for LazyRow/LazyColumn from
seem to be missing in androidx.compose.foundation:foundation:1.4.0-alpha02
le...@google.com <le...@google.com> #7
Hi, the feature is still in the LazyList internal APIs. I've marked the feature complete because we'll opening it up in Pager (which is the main use case for it) and we're studying the possibility of opening it up in LazyRow/Column (
do...@gmail.com <do...@gmail.com> #8
le...@google.com <le...@google.com>
fr...@gmail.com <fr...@gmail.com> #9
I'm also interested in this feature. When will it be available on LazyRow/Column?
as...@google.com <as...@google.com>
aj...@physics.msu.ru <aj...@physics.msu.ru> #10
go...@umito.nl <go...@umito.nl> #11
Looking for this feature in LazyColumn.
go...@umito.nl <go...@umito.nl> #12
Any updates on this?
tp...@gmail.com <tp...@gmail.com> #13
as...@google.com <as...@google.com> #14
We are looking into creating custom prefetcher APIs to address this feature.
de...@gmail.com <de...@gmail.com> #15
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #16
We have api for that in Pager already, but we are not sure about adding the same api into lists or grids.
Do you need it in order to improve the performance only? Will it help if we instead make it easier to tweak when and what items are being prefetched? The important difference here is that prefetch is not blocking the main thread and is only trying to load next item when the main thread is free, while apis like `beyondViewportPageCount` from `HorizontalPager` are eating the main thread time while we compose the items users need to see right now, even that those extra items are not visible yet.
do...@gmail.com <do...@gmail.com> #17
go...@umito.nl <go...@umito.nl> #18
For my app, I have a list of xml lines that are heavily formatted and processed. I need to use a lazy listview with an item per line for it to render properly. However on slower devices it scrolls with hiccups because it doesn't prerender a few items in advance.
I am still a Compose newbie, but from what I understand it's not possible to do this in a non recomposing way: determine optimal linebreaking for xml formatting. So it recomposes a few times to determine optimal layout. A render ahead option would at least make this not visible.
wa...@gmail.com <wa...@gmail.com> #19
+111111111111111111111
an...@google.com <an...@google.com> #20
Writing "+1" is not helping to increase the priority for the request as we are currently collecting exact use cases for this api as mentioned in
fr...@gmail.com <fr...@gmail.com> #21
For my app I had a list/grid of videos that needed to open/close websockets while I scroll. Without offscreen loading, the loading of videos was too slow. I tried to load items offscreen using firstItemIndex, but since my list was highly customizable (multiple columns, dynamic items count on screen) it was pretty terrible.
wa...@gmail.com <wa...@gmail.com> #22
I am developing a continuous sliding interface for vertical galleries, and I hope to be able to render 2-4 pages off screen in advance, rather than having users slide to the next page and load it again
an...@google.com <an...@google.com> #23
From what we hear so far most of the use cases can be solved by prefetching adjacent items. Prefetch is our mechanism of composing and measuring extra items when the main thread is idle. Right now we only prefetch one extra item in the direction of scroll and we are considering tweaking this logic to prefetch more items by default and also make this logic configurable. We already created a simple experimental api for users to try to play with changing the logic completely (beyondViewportPageCount
from HorizontalPager
is when you really need to compose the adjacent items together with the visible items because you want the whole Paget to set its height to the height of the larger page including those extra item. As otherwise the height will be only using the heights of the currently visible items and "jump" once you scroll to the new larger page. For that use case we introduced this api into Pager, but are not seeing good reasons to add it into lazy lists for now
le...@google.com <le...@google.com>
bl...@gmail.com <bl...@gmail.com> #24
Do you need it in order to improve the performance only?
For me, yes
Will it help if we instead make it easier to tweak when and what items are being prefetched?
Yes. It would be helpful if I can just set a prefetch = 5
parameter.
The important difference here is that prefetch is not blocking the main thread and is only trying to load next item when the main thread is free
For me, that is fine.
Description
Requesting for an API to preload offscreen items in a LazyColumn. Currently I didn't find a way to do so.
Example Use case:
My request is similar to the following APIs: