Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display list very slow #240

Open
matthieup240 opened this issue Oct 19, 2022 · 7 comments
Open

Display list very slow #240

matthieup240 opened this issue Oct 19, 2022 · 7 comments

Comments

@matthieup240
Copy link

I have a list with about 20k lines. To display this list, this take a very long time.
Is there a solution to resolve this inconvenient ? Thanks

@benwinding
Copy link
Owner

This is a common issue, try enabling LazyLoading via:

const dataProvider = FirebaseDataProvider(firebaseConfig, {
  lazyLoading: {
    enabled: true,
  },
});

Related to #59

@matthieup240
Copy link
Author

Thanks, I have tried it but when I want to do a filter, the values not already available are not founded.
Is there a solution about filters with lazyLoading enabled ?

@matthieup240
Copy link
Author

Is there a solution with the new "count" result announced last week at the Firebase Submit ?

@adrianbruegger
Copy link

adrianbruegger commented Nov 6, 2022

I experienced the same problem with slow lists and I can't yet enable lazyLoading because of the problems with filters too. I used a permanent filter as a workaround. I added this to the List component:

filter={{ collectionQuery: c => c.where('orderDate', '>=', aWeekAgo).where('orderDate', '<=', today) }}

@matthieup240
Copy link
Author

Thanks for your answer.
Don't understand your query.
Could you adding some details please ? What is orderDate ? Is it like CreatedAt ?

@adrianbruegger
Copy link

Yes, orderDate is like a CreateAt. The whole List component looks like this:

<List actions={<ListActions />} filters={orderFilter} filter={{ collectionQuery: c => c.where('orderDate', '>=', aWeekAgo).where('orderDate', '<=', today) }} sort={{ field: 'orderDate', order: 'DESC' }} {...props}>

Hope it helps.

@matthieup240
Copy link
Author

Ok thanks. But with this filter, I have no result....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants