Good question.  I did not know the file format, but I did make sure that my changes did not alter the semantics of the program.  I wrote the pmap_lim function specifically to preserve the order of items in the list.

I tested my changes by indexing all .erl files that come in OTP, then did a diff to an index I created with your original source code.  The files came out identical, so I assumed I did it right.

Sent from my iPad

On Jan 14, 2013, at 8:50 PM, Syed Mushtaq Ahmed <notifications@github.com> wrote:

> In src/erlcscope.erl:
> 
> > @@ -28,24 +28,60 @@ main(InPath)->
> >  	end,
> >  	{ok, Db} = file:open(?OUTPUT_FILE,[write]),
> >  	init_symbol_db(Db,0),
> > -	lists:foreach(fun(Fname) -> 
> > -		build_symbol_db_from_file(Db,Fname) end, 
> > -	Files),
> > -	write_symbol_trailer_to_db(Db, Files).
> > +	Sched = erlang:system_info(schedulers),
> > +	Entries = pmap_lim(fun(Fname) ->
> Will the order of evaluation be maintained if we are processing files in parallel. I was following the db format mentioned in 
> ftp://ftp.eeng.dcu.ie/pub/ee454/cygwin/usr/share/doc/mlcscope-14.1.8/html/cscope.html
> 
> —
> Reply to this email directly or view it on GitHub.
>