Merge lp:~submarine/ubuntu-scopes/devhelp-50-results-limit into lp:~submarine/ubuntu-scopes/devhelp
Proposed by
David Callé
Status: | Merged |
---|---|
Approved by: | James Henstridge |
Approved revision: | 19 |
Merged at revision: | 18 |
Proposed branch: | lp:~submarine/ubuntu-scopes/devhelp-50-results-limit |
Merge into: | lp:~submarine/ubuntu-scopes/devhelp |
Diff against target: |
35 lines (+12/-1) 1 file modified
src/unity_devhelp_daemon.py (+12/-1) |
To merge this branch: | bzr merge lp:~submarine/ubuntu-scopes/devhelp-50-results-limit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
James Henstridge | Approve | ||
Review via email: mp+154539@code.launchpad.net |
Commit message
Limit the number of results to 50.
Description of the change
Limit the number of results to 50.
To post a comment you must log in.
Is the purpose of this branch to try and improve performance, or just to limit the result count?
While this certainly does limit the search results to 50 hits, it looks like it is still doing approximately the same amount of work (I assume scanning the /usr/share/ gtk-doc/ html tree and running an XML parser on each .devhelp file is the slow point).
If performance is the issue, then perhaps one of the following would help:
1. make setup_devhelp() a generator, so exiting the loop early will cut the scanning work short.
2. cache the results of setup_devhelp() between searches.
Either way, a linear scan of the keywords found in the .devhelp file seems awfully slow.