bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about --statistics option of htags


From: Shigio Yamaguchi
Subject: Re: question about --statistics option of htags
Date: Tue, 23 Aug 2005 22:58:44 +0900

> If $GTAGSCACHE is large, writing tag cache to the disk in clean() will take 
> much time.
> I want to omit this useless writing. 
> However, I cannot find any method for it.
> Are there any ideas?

You are right. It is useless writing.
How about adding new abandon flag to db->close()?
If the flag is specified, writing process is omited.
We can set this flag to 1 for all db files which was opened
with DBOP_REMOVE flag.

[libutil/dbop.c]
void
dbop_close(dbop)
{
        int abandon = dbop->openflags & DBOP_REMOVE ? 1 : 0;
        ...
        (void)db->close(db, abandon);

[libdb/bt_close.c]
int
__bt_close(dbp, abandon)
        DB *dbp;
        int abandon;
{
        /* Sync the tree. */
        if (!abandon)
                if (__bt_sync(dbp, 0) == RET_ERROR)
                        return (RET_ERROR);



--
Shigio YAMAGUCHI <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]