Skip to content

Support loadSubset deduplication in query collection #836

@kevin-dp

Description

@kevin-dp

In #835 we disabled the deduplication of loadSubset calls inside the query collection because there were some problems with garbage collection of queries which would lead to deduplicated queries to use stale data from the local collection (because the query they depend on was the one loading updates from the backend but is now GCed).

However, we do need to optimize the query collection such that we do not fetch data we already have locally and integrate it smartly with GC such that we detect when data becomes stale and needs to be fetched from the backend. The main problem came from the fact that we did reference counting on a per-row basis, we're thinking that it would be more maintainable on a per-query basis, i.e. if query 1 loads some data and query 2 is deduplicated because of query 1, then query 1's ref count is essentially 2 (meaning that it can only be GCed after query 2 has been GCed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions