What is the recommended/fastest way to search for tools in the Tool Shed API? #18543
Replies: 2 comments 9 replies
-
FWIW the query is faster if you drop the I do think that's the endpoint to use, and maybe we can improve the search but I'm a little pessimistic in that area. I think we should have focused on a simple, exact search before we went into more complicated searches. |
Beta Was this translation helpful? Give feedback.
-
I've had a repository that scrapes the toolshed and creates various metadata files, for a while since the TS doesn't give me what I need (though it will in the future, very excited to deprecate this!) If you would want a single large json blob that had every tool id:description, it would be trivial to add that to our data exports. That would not get you search, but maybe the UX of "slow first query and instant subsequent ones" is fine? |
Beta Was this translation helpful? Give feedback.
-
I'm working on supporting
tool_id
search/auto-completion for Format2 workflow files.The idea is to roughly type the identifier (or maybe the name would be better 🤔) of a tool and then invoke intelli-sense by pressing
Ctrl+Space
. This will search the Tool Shed for the top 5 tools that match the ID and let you select the desired one to auto-complete with the full signature.Here is a proof of concept:
Unfortunately, the time to search for tools is too long to be usable 😞
The screencast above has been cut while "loading..." to a couple of seconds, but it actually took more than a minute to perform the search 😓
Here is a snippet to show how I'm doing the search:
searchToolshedTools.js
If I run this with
node searchToolshedTools.js
I get something like this:Show full output
A couple of seconds is fine, but waiting 93 (sometimes more) seconds for the response seems unreasonable 😮💨
My questions are:
Am I using the wrong API endpoint, query, or complete approach?
If not, how can we improve the search speed?
I'm not very familiar yet with the Tool Shed codebase, but I guess there is a good reason this takes so much time.
I'm happy to work on a solution if there is anything we can do to improve that! I'd love to read your ideas.
Thanks! 🙏
Beta Was this translation helpful? Give feedback.
All reactions