[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: algorithm of incremental updating
From: |
Hideki IWAMOTO |
Subject: |
Re: algorithm of incremental updating |
Date: |
Sun, 03 Jul 2005 23:31:39 +0900 |
On Sat, 02 Jul 2005 20:17:52 +0900, Shigio Yamaguchi wrote...
> /* Open all tags */
> foreach db (GTAGS, GRTAGS, GSYMS) {
> gtop[db] = gtags_open(db)
> }
Opening three tag files at once increases the memory requirement.
I don't think it a good idea.
> foreach p (updatelist) {
> log "Updating tags of <p>"
> foreach db (GTAGS, GRTAGS, GSYMS) {
> log "..<name of tag>"
> gtags_add(gtop[db], p);
> }
> log newline
> }
This makes it impossible to process multiple files by one parser.
The tuning for performance and the user-friendly message seem to be exclusive.
I propose changing like this.
incremental(dbpath, cwd)
{
if (!vflag
&& ((comline = dbname(GTAGS)) != NULL
&& locatestring(comline, "%S", MATCH_FIRST) != NULL)
|| ((comline = dbname(GRTAGS)) != NULL
&& locatestring(comline, "%S", MATCH_FIRST) != NULL)
|| ((comline = dbname(GSYMS)) != NULL
&& locatestring(comline, "%S", MATCH_FIRST) != NULL))
return incremental_optimized_for_speed(dbpath, cwd);
----
Hideki IWAMOTO address@hidden