#541: WebSearch - external_collections search degrades performance of the search
engine
------------------------+----------------------------
Reporter: rchyla | Owner:
Type: defect | Status: infoneeded_new
Priority: major | Milestone:
Component: WebSearch | Version:
Resolution: | Keywords:
------------------------+----------------------------
Changes (by simko):
* status: new => infoneeded_new
Comment:
1) As I said above, and as you can easily verify by looking at the
source code, the external searches are done only after the internal
search results are fully compiled and displayed to the end user. So
the external search engine processing is being done while the user is
already browsing in the displayed internal search results. It is
therefore not true that `perform_external_collection_search()` could
"potentially degrade performance of all the searches" or that "search
operation must wait until that completes", to take your expressions.
Search operation is already completed by the time external search
engines are called.
2) `do_external_search()` is performed asyncoreously and with a safety
timeout for every external search source. Regardless of whether the
search may take up to the timeout, which is 5 seconds by default, the
users are already shown and reading internal search results, so there
is not much trouble here.
3) Making external searches in an Ajax style is of course a possible
option, but this would require to switch the whole search UI to Ajax,
which is a another, bigger question, and not related to the optimal
placement of `perform_external_collection_search()` in the current
approach.
In summary, let me repeat once more that the external search engine
processing is called asyncoreously and only after the internal search
results are fully processed and displayed to the user, hence there is
no performance degradation in and of itself here.
--
Ticket URL: <http://invenio-software.org/ticket/541#comment:7>
Invenio <http://invenio-software.org>