gtags.files contains 8 source files, fox example:

libglibc/regex.c
libglibc/snprintf.c
libparser/C.c
libparser/Cpp.c
libparser/java.c
libparser/parser.c
libparser/php.c
libparser/asm_scan.c


The addition/changed/deleted is determined by the output of stat(). To keep
it simple, we just maintain a list of files that have changed. It can be
further optimized by using a prefix or separate file for
added/deleted/changed file list but will complicate the code for minimal
performance gain. I had tried it using the prefix approach, '+' for new
files, '-' for deleted files and no prefix for modified/changed files.

My next work will be to try a multi-threaded parallel processing of files.
This will be hard due to usage of static & global variables but I am sure
will be interesting to hack.

with best regards,
dhruva


On Mon, Aug 25, 2014 at 3:38 PM, Shigio YAMAGUCHI <[email protected]> wrote:

> Hi,
> > $ time gtags -D -i -f gtags.files
>
> What should be written in 'gtags.files'?
>
> o when a file was added
> o when a file was changed
> o when a file was deleted
>
> Or, aren't these distinguished?
>
> Shigio
>
>
> 2014-08-26 3:36 GMT+09:00 dhruva <[email protected]>:
>
> Sorry for the real long delay. Got caught up with office work.
>>
>> # Create a list of source files requiring gtags update
>> $ wc -l gtags.files
>> 8 gtags.files
>>
>> # Touch the source files to force an update
>> $ cat gtags.files|xargs touch
>>
>> # Update gtags via single file update
>> $ time for ii in `cat gtags.files`; do /usr/software/bin/gtags
>> --single-update $ii; done
>>
>> real    1m19.445s
>> user    0m11.462s
>> sys     0m9.379s
>>
>> # Touch the source files to force an update
>> $ cat gtags.files|xargs touch
>>
>> # Update gtags via batch processing the list of files (patch attached)
>> $ time gtags -D -i -f gtags.files
>>
>> real    0m11.431s <--- Improved performance
>> user    0m1.536s <--- Improved performance
>> sys     0m1.219s <--- Improved performance
>>
>>
>> with best regards,
>> dhruva
>>
>>
>>
>> On Wed, Jul 9, 2014 at 8:21 PM, Leo Liu <[email protected]> wrote:
>>
>>> On 2014-07-08 14:36 -0700, dhruva wrote:
>>> >  The following patch adds support for batch processing of files from a
>>> file
>>> > list during incremental update instead of multiple single file updates.
>>> >
>>> > - Added a new command line option '-D|--delta' to allow specifying a
>>> > delta/incremental file list via '-f'
>>> >
>>> > No need for '+' or '-' prefix like in the original/previous patch.
>>> >
>>> > -dhruva
>>>
>>> Not related to the feature. I sometimes wish global has better option
>>> names something that one dosn't read and automatically misunderstand.
>>>
>>> Leo
>>>
>>>
>>> _______________________________________________
>>> Bug-global mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/bug-global
>>>
>>
>>
>> _______________________________________________
>> Bug-global mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/bug-global
>>
>>
>
>
> --
> Shigio YAMAGUCHI <[email protected]>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
>
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to