You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues and confirmed this is not a duplicate
Issues and steps to reproduce
FlexboxLayoutManager will throw OOM if number of item is too many. To reproduce this, simply return Integer.MAX_VALUE from Adapter.
I could see that you save a cache of Measure spec/size in an array of long whose size is depended on number of Item multiple by 2. This is the root cause, but I don't know the mindset behind the use of this Array, so I could not put any effort to fix this at the moment. Removing or Changing the use of this Array could break the FlexboxLayout too.
Expected behavior
From my investigating with other built-in LayoutManager, Integer.MAX_VALUE would not crash any of them. I expect FlexboxLayoutManager could be like this too.
Version of the flexbox library
Latest: 0.3.1
Link to code
N/A
The text was updated successfully, but these errors were encountered:
Thanks for filing this. The reason why measured results are cached is to reuse the same calculation logic for flexbox for both FlexboxLayout and FlexboxLayoutManager.
An individual view from FlexboxLayoutManager isn't retrieved in the same way as FlexboxLayout during calculation.
Anyway I'll have a look if that allocation can be reduced.
Issues and steps to reproduce
FlexboxLayoutManager will throw OOM if number of item is too many. To reproduce this, simply return Integer.MAX_VALUE from Adapter.
I could see that you save a cache of Measure spec/size in an array of long whose size is depended on number of Item multiple by 2. This is the root cause, but I don't know the mindset behind the use of this Array, so I could not put any effort to fix this at the moment. Removing or Changing the use of this Array could break the FlexboxLayout too.
Expected behavior
From my investigating with other built-in LayoutManager, Integer.MAX_VALUE would not crash any of them. I expect FlexboxLayoutManager could be like this too.
Version of the flexbox library
Latest: 0.3.1
Link to code
N/A
The text was updated successfully, but these errors were encountered: