Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to use scm.exe to query multiple file custom attributes efficiently?

Hi All,


What is the most efficient way of querying custom attributes using scm.exe for multiple files in a directory?

Im currently listing out the files and iterating through each one running a get custom-attribute command, this takes 30-40 seconds per item and having hundreds of items adds a massive amount of execution time to scripts.

Any ideas on better ways to do this?

0 votes



One answer

Permanent link
Ideas:
-Try using 'lscm' instead of 'scm'. This should keep the SCM daemon running and should speed it up a bit (by avoiding having to start one up every time)
-The 'get custom-attribute' command takes a space separated list of files, so you might want to collect a few files up and then run the command (of course you will have to manage the batching of the files, and parsing of the results).
-Writing your own code using the plain-Java APIs. See: IWorkspaceManager.getCustomAttributes(IVersionableHandle[] state, IProgressMonitor monitor)

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 1,202

Question asked: Aug 19 '19, 11:35 a.m.

Question was seen: 1,980 times

Last updated: Aug 19 '19, 2:37 p.m.

Confirmation Cancel Confirm