Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug embeded quicksearch is laggy on beta6

Discussion in '2021.1 Beta' started by laurentlavigne, Feb 21, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    upload_2021-2-20_20-49-36.png
    keep typing numbers
    what you get is delayed result
    what's expected on an AMD 4900 is instant result
     
  2. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Delayed for how many seconds? The results should show up in less than 250 ms for sure.
    There is a debouncing threshold you can configure in the search preferences.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    this?
    doesn't work
    upload_2021-2-22_16-25-35.png
    10ms should be near hierarchy speed, there is still a pause
     
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,336
    I assume that it's because it's happening on a different thread, so it has to wait until the threads decide to sync. 10ms is a long time, though, so that might be an actual bug.

    That being said, synchronous search bars feels like utter ass unless you've got a teeny tiny project. You write a character, the search engine does the search for that character, you write a new character, the search engine does the search for that character, etc. So if you type "my_nice_tree" really fast, you have to wait for the engine to finish searching for "m", "my", "my_"... etc. on the main thread. That's 11 searches you didn't want that hangs everything (including the text input) before you get your actual search.

    So the typing debounce threshold is really important for a good feeling search. The ideal time is slightly longer than how long it takes between each of key downs while typing.

    So the change was for sure a good one, and it made searching a ton better.
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Yep it's a bug, the slider does nothing, I think the debounce in the project view is hard coded to 200ms - logged as 1317832

    Even if 250ms is hardcoded that's 4 character per seconds which is 240cpm, I run around 270 so wouldn't notice so I think the lag comes from something else than pure debounce.
    My guess is the wait time = debounce+searchtime instead of = Max(debounce, searchtime) so it'll always be slow no matter what.
     
    LeonhardP likes this.