Uploaded image for project: 'ui-items'
  1. ui-items
  2. UIIT-27

searching as text is entered does not scale.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P2
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Labels:
    • Environment:

      Postgres (RDS):

      • t2.medium (2 vCPU, 4GB RAM)
      • 1.7 Million items

      With our test corpus, the "A tale of two cities" search returns 63 items.

    • Template:

      Description

      Currently, search queries occur on a continuous basis when typing in the search box. For example, as I type "A tale of two cities":

      {{stripes-logger.js:27 – (action) searched for 'A'
      stripes-logger.js:27 – (action) searched for 'A '
      stripes-logger.js:27 – (action) searched for 'A t'
      stripes-logger.js:27 – (action) searched for 'A ta'
      stripes-logger.js:27 – (action) searched for 'A tal'
      stripes-logger.js:27 – (action) searched for 'A tale'
      stripes-logger.js:27 – (action) searched for 'A tale '
      stripes-logger.js:27 – (action) searched for 'A tale o'
      stripes-logger.js:27 – (action) searched for 'A tale of'
      stripes-logger.js:27 – (action) searched for 'A tale of '
      stripes-logger.js:27 – (action) searched for 'A tale of t'
      stripes-logger.js:27 – (action) searched for 'A tale of tw'
      stripes-logger.js:27 – (action) searched for 'A tale of two'
      stripes-logger.js:27 – (action) searched for 'A tale of two '
      stripes-logger.js:27 – (action) searched for 'A tale of two c'
      stripes-logger.js:27 – (action) searched for 'A tale of two ci'
      stripes-logger.js:27 – (action) searched for 'A tale of two cit'
      stripes-logger.js:27 – (action) searched for 'A tale of two citi'
      stripes-logger.js:27 – (action) searched for 'A tale of two citie'
      stripes-logger.js:27 – (action) searched for 'A tale of two cities'}}

      The result is 20 independent searches. With any significant number of items in the database this becomes increasingly slower and slower. For reference, the search takes
      ~5 seconds when the title is pasted in all at once. When typing it out, the final query doesn't return for ~38 seconds. Granted, the hardware being used is far from "production" quality, but these numbers are intended to show relative latencies. Presumably, we'll be able to bring those ~5 second queries down to a more reasonable duration, but the penalty incurred by the continuous search seems to place unnecessary stress on the system.

      This also impacts the user experience. As the "intermediate" queries return, the search results are updated causing results to appear for a moment before being replaced. This happens repeatedly until the final query returns. Unless you're watching the console, it's hard to tell when the dust has settled and you're looking at the final results.

        TestRail: Results

          Attachments

            Activity

              People

              Assignee:
              mike Mike Taylor
              Reporter:
              cmcnally Craig McNally
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m

                    TestRail: Runs

                      TestRail: Cases