Skip to content

Slow search with single char, faster with two or more

Using the branch 87-reproducible-gui-setup I can run the UI (hooray), but the search is behaving weirdly. It renders always, consistently, slower with one character (>10 seconds), but as soon as I search for two or more characters it renders a lot faster (<2 seconds).

Not sure if an issue in the API, or in both API and GUI.

kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/88/all/active
{"experiment":[]}

real	0m0.215s
user	0m0.002s
sys	0m0.012s
kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/8/all/active
{"experiment":[]}

real	0m1.345s
user	0m0.000s
sys	0m0.012s

2, 3, 4 characters all appear to return within a similar time range.

sys	0m0.012s
kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/888/all/active
{"experiment":[]}

real	0m0.183s
user	0m0.007s
sys	0m0.007s
kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/8888/all/active
{"experiment":[]}

real	0m0.187s
user	0m0.008s
sys	0m0.004s
kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/88/all/active
{"experiment":[]}

real	0m0.180s
user	0m0.007s
sys	0m0.006s

Just the single character that always takes much more time:

kinow@ranma:~/Development/javascript/workspace/autosubmitreact$ time curl http://localhost:9999//search/1/all/active
{"experiment":[]}

real	0m7.896s
user	0m0.008s
sys	0m0.008s