Simple module with lots of rows

edited January 2014 in Share
I have a module that has in excess of 25K rows.

Some of its fields are foreign keys to other large tables. I'm trying to find ways of making the standard Fuel CRUD reasonably fast, but retain as much of the functionality as I can. One thing I would like to omit, to speed things up, is the "fuel_other_items" dropdown - this produces a lot of HTML and the page for editing is ~2Mb!! Foreign key relationships in other selects are slowing things up too, but that field can be dispensed with. But how?

Comments

  • edited 2:59AM
    You can overwrite your model's other_items method to return an empty array.
  • edited 2:59AM
    I can't find that method either in MY_model or Base_module_model? When I add a method of that name to my model, the select in the button bar remains. Eg
    function other_items() { return array(); }
  • edited 2:59AM
    Sorry... it's called get_others.
  • edited January 2014
    OK that's working now - and the absence of all those options tags is dramatic. The page was a whopping 2Mb, now it's 34kb.

    I knew that would be easy - I can see the method listed in the docs, but I wouldn't have guessed it was for that drop-down without some prompting. Thanks!

    Now how to deal with the foreign key selects that are nearly as bad... some sort of ajax solution I think.
Sign In or Register to comment.