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
Hi @sergdort , thank you for your interesting work. We got a lot of inspiring things from that.
I would like to share one of the problem that we are trying to resolve in process of adopt Input, Output and transform method between View and ViewModel.
In our project we use RxSwift + MVVM + Coordinator. ViewModel of Cell in our UICollectionView has to implement some work for UI of cell. So when UICollectionViewDataSource calls dequeueReusableCell every time Cell calls method transform and create new output from ViewModel. It requires a little bit of time for UI so it’s visible on scroll. In our first approach, Cell subscribed on event of already created VIewModel and it worked fine (but this solution was less functional). Now we call every time transform method and it blocks UI on scroll because ViewModel should be recreated every time.
Did you ever think about similar situation or do you have some ideas how it can be resolved?
Thank you
The text was updated successfully, but these errors were encountered:
This is an interesting problem. TBH I've never encountered any performance issues with Rx. I wonder is it establishing transformations takes so much time (and it's really surprising, as it's just allocation of some operator classes)
Are you sure that you're not doing any heavy computations on subscription?
@sergdort Yes, I have pretty complex cell, because inside of it I have another CollectionView. Every time when cell is reused, in transform method I initialize viewmodels for nested CollectionView. It takes time. Temporary, to resolve the issue, I removed from transform Driver that initialize viewmodels for nested collectionView and declared it as a constant.
Hi @sergdort , thank you for your interesting work. We got a lot of inspiring things from that.
I would like to share one of the problem that we are trying to resolve in process of adopt Input, Output and transform method between View and ViewModel.
In our project we use RxSwift + MVVM + Coordinator. ViewModel of Cell in our UICollectionView has to implement some work for UI of cell. So when UICollectionViewDataSource calls dequeueReusableCell every time Cell calls method transform and create new output from ViewModel. It requires a little bit of time for UI so it’s visible on scroll. In our first approach, Cell subscribed on event of already created VIewModel and it worked fine (but this solution was less functional). Now we call every time transform method and it blocks UI on scroll because ViewModel should be recreated every time.
Did you ever think about similar situation or do you have some ideas how it can be resolved?
Thank you
The text was updated successfully, but these errors were encountered: