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
Would it make sense to implement a prop to disable GC (a'la Relay Classic behaviour) to this package?
I find it wasteful, even annoying to fetch all the data again & again in most of my own apps. Very few (browser) apps are very long-lived & I don't belive most of our apps ever get memory problems, especially if you don't target emerging markets (very low-end devices).
It would also be pleasantly flexible for different strategies, for example:
List view - dynamic, updates often, don't retain: <QueryRenderer other={"props"}/>
Single item view - retain it: <QueryRenderer retain other={"props"}/>
It would be very cheap because it would only be checked againts on componentWillUnmount or what?
But how would one even implement this? I think something like this, haven't seen any side-effects so far..
_release(){// ... _rootSubscription & _pendingFetch code -> nothing to do with retaining data// reference to retained data ("protected" from garbage collection) - jackpot, add conditionif(!this.props.retain&&this._selectionReference){this._selectionReference.dispose();this._selectionReference=null;}}
I haven't 100% figured out yet how onError & onNext might affect retained data in different situations.
The text was updated successfully, but these errors were encountered:
Would it make sense to implement a
prop
to disable GC (a'la Relay Classic behaviour) to this package?I find it wasteful, even annoying to fetch all the data again & again in most of my own apps. Very few (browser) apps are very long-lived & I don't belive most of our apps ever get memory problems, especially if you don't target emerging markets (very low-end devices).
It would also be pleasantly flexible for different strategies, for example:
<QueryRenderer other={"props"}/>
<QueryRenderer retain other={"props"}/>
It would be very cheap because it would only be checked againts on
componentWillUnmount
or what?But how would one even implement this? I think something like this, haven't seen any side-effects so far..
I haven't 100% figured out yet how
onError
&onNext
might affect retained data in different situations.The text was updated successfully, but these errors were encountered: