Hi Juan,

If you want to speed up nomossa, a better approach is to:
1) Specify multiple files on the command line.  That way nomos will only be 
spawned once and process all the files.  For example:
  nomossa file1 file2 …
  or 
  nomossa a*

2) The next step is to spawn multiple nomossa’s in the background so you can 
have multiple nomos’s running simultaneously.  If you are doing this on a 
single machine, you probably don’t want the number of nomos instances to exceed 
the number of cores -1.  But feel free to experiment.

Bob Gobeille


On Mar 26, 2014, at 8:21 PM, Shi, Yao-Bin (Larry, GBU-HPSW, Cloud and OS) 
<[email protected]> wrote:

> here is one script for reference:
> 
> #!/bin/bash
> for file in $(find . -type f)
>  do
> #echo "$file"
>  ./nomossa "$file"
>  done
> 
> hope it is helpful.
> 
> -Larry
> 
> 发件人: [email protected] 
> [[email protected]] 代表 Juan José González 
> [[email protected]]
> 发送时间: 2014年3月27日 5:13
> 收件人: [email protected]
> 主题: [FOSSology] Getting license of multiple files at one with nomos
> 
> Hi eveyrone,
> 
> I have been writing an script that detects licenses of files inside a folder 
> (using python)
> 
> using pseudo code is something like:
> 
> for file in folder:
>    license = open_subprocess("nomossa " + file)  # creates and destroy a 
> process for every file
> 
> Now I am dealing with folder with thousands of files and I am trying to 
> reduce runtime, not creating a new process for each file, something like:
> 
> nomos = create_subprocess("nomossa")
> for file in folder:
>    license = nomos.input(file)
> nomos.close()
> 
> See that a process is opened once and then use it in an interactive way. This 
> approach works with programs like cat, if you type cat on your terminal it 
> waits for input, but not nomos. It is possible in this moment to do something 
> similar, if not, is it feasible?
> 
> I know I can use another approach:
> 
> license = create_subprocess("nomossa" + a list of file)
> # nomos file1 file2 file3
> 
> But because how my script is evolving I like to consider the option explained 
> above.
> 
> Thank you very much.
> _______________________________________________
> fossology mailing list
> [email protected]
> http://lists.fossology.org/mailman/listinfo/fossology

_______________________________________________
fossology mailing list
[email protected]
http://lists.fossology.org/mailman/listinfo/fossology

Reply via email to