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

How will this deal with 500K rows? #35

Closed
JehandadK opened this issue Sep 16, 2014 · 4 comments
Closed

How will this deal with 500K rows? #35

JehandadK opened this issue Sep 16, 2014 · 4 comments

Comments

@JehandadK
Copy link

I have an entity which has many to many relation with another entity which has 500K rows. Will multi select work?

@fzaninotto
Copy link
Member

Not for now. An autocomplete widget is the only way to deal with this cardinality, it's on the todo list.

@JehandadK JehandadK changed the title How will this deal with many rows? How will this deal with 500K rows? Sep 16, 2014
@narigua
Copy link

narigua commented Jan 7, 2015

Or maybe you can add to your API a content-range? and customize pagination ?

example :

// Pagination Global Var
        var rangeStart = 0;
        var itemsPerPage = 10;
        var rangeEnd = itemsPerPage - 1;

        function pagination(page, maxPerPage) {
            rangeStart = (page - 1) * maxPerPage;
            rangeEnd = page * maxPerPage;                        
        }

        function totalItems(response) {
            var items = response.headers('content-range');
            if (items !== null) {
                var total = items.split("/").pop();
                return total;
            } else {

            }

        }

        function headerRange() {
            return {
                range: 'items=' + rangeStart + '-' + rangeEnd
            };
        }

And call your functions in entity list :

.headers(headerRange)
.perPage(itemsPerPage)
.totalItems(totalItems)
.pagination(pagination)

@fzaninotto
Copy link
Member

The problem isn'y on the API side, it's with the way we deal with Reference widgets.

Also, pagination configuration will soon change a lot, see #211

@fzaninotto
Copy link
Member

Thanks to #508, autocomplete is now part of ng-admin, and this WILL scale!

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