here is my smartgrid (simplified to show only essential pieces): grid = SQLFORM.smartgrid(db.Members, linked_tables=['Affiliations'], constraints=dict(Members=query), deletable=False, details=False, editable=True, create=True)
Members is a table with several thousand records. Affiliations is a table with a reference field back to Members; each member generally has a small number of Affiliations. query on the Member table that selects a number of Members (generally a few up to a few hundred). The page displays the subset of Members efficiently, with each selected member including an edit button and an Affiliations link. As expected the edit button displays the individual Member record promptly. Clicking the Affiliations link does display the page showing the small number of affiliations belonging to the member as one would expect, but very slowly (order of 10 seconds in my test environment). It must be retrieving all Affiliations and then filtering to rows belonging to the member??? I'm updating an aging implementation that uses legacy crud, as smartgrid will allow me to greatly reduce the amount and complexity of controller code, however the legacy implementation generates the equivalent page with no apparent delay. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.