Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global search is slow for some search terms #372

Closed
osma opened this issue Dec 2, 2015 · 4 comments
Closed

Global search is slow for some search terms #372

osma opened this issue Dec 2, 2015 · 4 comments

Comments

@osma
Copy link
Member

osma commented Dec 2, 2015

At which URL did you encounter the problem?

http://dev.finto.fi/fi/search?clang=fi&anylang=on&q=b%C3%B6cker&vocabs=
http://dev.finto.fi/fi/search?clang=fi&anylang=on&q=suunnittelu&vocabs=

What steps will reproduce the problem?

  1. Perform global search, in any language, for "böcker" or "suunnittelu"

What is the expected output? What do you see instead?

The query can take a very long time, over 10 seconds.

This happens both in the 1.3-maintenance version (finto.fi) and in current master (dev.finto.fi).

The problem is unrelated to #371.

Should investigate what causes the delay.

@osma osma added this to the 1.4 milestone Dec 2, 2015
@osma osma changed the title Global search is slow Global search is slow for some search terms Dec 2, 2015
@osma
Copy link
Member Author

osma commented Dec 3, 2015

The problem is not the underlying queryConcepts query. These take around 100ms:
http://dev.finto.fi/rest/v1/search?query=b%C3%B6cker*
http://api.finto.fi/rest/v1/search?query=b%C3%B6cker*

@osma
Copy link
Member Author

osma commented Dec 3, 2015

This query for "böcker" from 12 vocabularies returns just the YSO concept 12 times and takes about 5 seconds:
http://dev.finto.fi/fi/search?clang=fi&anylang=on&q=b%C3%B6cker&vocabs=keko+kto+kulo+liito+maotao+mero+pto+puho+tero+tsr+valo+yso

If I cut it down to 6 vocabularies it takes about 2.5 seconds:
http://dev.finto.fi/fi/search?clang=fi&anylang=on&q=b%C3%B6cker&vocabs=keko+kto+kulo+liito+maotao+mero

So the problem seems to be related to displaying the YSO concept. Each time takes about 400 ms.

@osma
Copy link
Member Author

osma commented Dec 3, 2015

It's not the SPARQL queries. They take about half a second total. PHP CPU usage is high during the execution.

@osma
Copy link
Member Author

osma commented Dec 3, 2015

After the above commit the main culprit is now Concept->getProperties which takes about 200 ms per concept.

@osma osma closed this as completed in c84cb77 Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant