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

[FEATURE] - Performance Optimization for relation fields #342

Open
ogoldberg opened this issue Jun 7, 2024 · 2 comments
Open

[FEATURE] - Performance Optimization for relation fields #342

ogoldberg opened this issue Jun 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ogoldberg
Copy link
Contributor

Summary

on the edit view, when selecting a relation field, if there are a lot of records it takes a really long time to load the options.
Wondering if there could be some kind of async pre-fetch operation, maybe a cache, maybe pagination, maybe all of the above?

Basic Example

on the edit view, when selecting a relation field, if there are a lot of records it takes a really long time to load the options.
Wondering if there could be some kind of async pre-fetch operation, maybe a cache, maybe pagination, maybe all of the above?

Drawbacks

I understand needing to balance keeping the data dynamic while also keeping it fast, and also keeping search as simple as possible. It's a tough problem to solve.

Unresolved questions

No response

@ogoldberg ogoldberg added the enhancement New feature or request label Jun 7, 2024
@foyarash
Copy link
Collaborator

We are already applying pagination to the search field (see https://github.com/premieroctet/next-admin/blob/main/packages/next-admin/src/actions/resources.ts#L52)

We will have a look at it

@cregourd
Copy link
Contributor

cregourd commented Jul 1, 2024

The relationship field indeed uses the pre-fetch operation for the first batch, cache and pagination.

If you're still struggling with that, please provide us with more information about your schema.

As we had done with issue #343 we have tried to reproduce the issue by using a huge amount of data, and huge plain text fields, without success.

Let us know about your situation 🚀

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

No branches or pull requests

3 participants