1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

strange behaviour with autocomplete, concat, separators and loading time

Discussion in 'Community' started by mirceat, Oct 12, 2018.

  1. mirceat

    mirceat Member

    Level: Community
    Hello,

    I have a list with many rows, in which i want to search after company name, SSN or phone number. There are over 2 mil rows so i'm trying to load the data fast as i can.

    I've created a dbjoin element rendered as autocomplete. Few things here:

    1. Using company as label rise the load time to over 9 seconds. Tried with and without indexing the column (even worse without index)

    2. Using the ID as label the load time drop to 3.42 seconds. Good enough.

    But users will search after company name or SSN or owner phone. So i tried to concat the label:

    - using COMPANIE, '', SSN,'', TELEFON (no space in separators or no separators at all): DOMContentLoaded: 11,54 s

    - using COMPANIE, ' ', SSN,' ', TELEFON (spaces between separators), DOMContentLoaded: 3,97 s.

    That's good, but now i have two empty spaces left and the autocomplete stops working untill i remove those empty spaces from field. The "trim empty concat" option doesn't help here..

    So..how can i concat the label and still having a good load time?

    Thank you
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Are you talking about load time for the whole page, or for doing an autocomplete lookup?

    -- hugh
     
  3. mirceat

    mirceat Member

    Level: Community
    I'm talking about the load time for the whole page. There are only 8 field elements + this dbjoin in form and the load time increases only if i enable the dbjoin element.
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    That's weird, as the autocomplete shouldn't do an unconstrained select of the joined table. On page load, it should either just select the existing value/label (so a single row), or none (if no selection). Does it do that on new and edit?

    -- hugh
     

Share This Page