On Sun, Jan 13, 2013 at 1:20 PM, j. v. d. hoff <veedeeh...@googlemail.com>wrote:

> why is this?


i can't say with certainty - my insight into sqlite's internals is very
limited.


> I do of course see this delay when grepping through the whole timeline
> (and my initial wish was motivated by the hope that the relevant info is
> "just there" in the database), but I would have thought the relevant
> statistics is already in the database. and if not so: why not at a small
> table containing these statistics?


As a general rule (perhaps not consciously) fossil doesn't cache what it
can calculate. There are a few instances where it builds an internal temp
table as a form of cache, but those are few and far between. We don't
(yet?) have a generic mechanism/API for caching in fossil. For this
particular calculation, it would be easy for the cache to get out of sync
if someone adds a feature which modifies the values it depends on.

Here's a first draft, basically the same as the /stat page, reformatted for
the console, using the "other" commit count calculation, and adding
wiki/ticket change counts:

stephan@tiny:~/cvs/fossil/fossil$ f stat --brief
Repository Statistics:
Repository Size: 35969024 bytes (36.0MB)
Duration Of Project: 2003 days or approximately 5.48 years.
Project ID: CE59BB9F186226D80E49D1FA2DB29F935CCA0333
Server ID: c7d762ef2a202474a9d04a38050f1c789b2fc771
Fossil Version: 1.25 2013-01-13 02:01:18 [a0dd51e9af] (gcc-4.7.2)
SQLite Version: 2013-01-09 11:31:17 [5774f2175c] (3.7.16)
Database Stats: 35126 pages, 1024 bytes/page, 1076 free pages, UTF-8,
delete mode


stephan@tiny:~/cvs/fossil/fossil$ f stat
Repository Statistics:
Repository Size: 35969024 bytes (36.0MB)
Number Of Artifacts:  19497 (stored as 5369 full text and 14128 delta blobs)
Uncompressed Artifact Size: 52103 bytes average, 4993770 bytes max,
1015763428 bytes (1.0GB) total
Compression Ratio: 28:1
Number Of Check-ins: 4890
Number Of Files: 749
Number Of Wiki Pages: 23 (282 changes)
Number Of Tickets: 990 (3137 changes)
Duration Of Project: 2003 days or approximately 5.48 years.
Project ID: CE59BB9F186226D80E49D1FA2DB29F935CCA0333
Server ID: c7d762ef2a202474a9d04a38050f1c789b2fc771
Fossil Version: 1.25 2013-01-13 02:01:18 [a0dd51e9af] (gcc-4.7.2)
SQLite Version: 2013-01-09 11:31:17 [5774f2175c] (3.7.16)
Database Stats: 35126 pages, 1024 bytes/page, 1076 free pages, UTF-8,
delete mode


The "brief" flag removes any calculations which tend to grow with the size
of the repo - basically anything which requires a non-O(1) query.

i should probably(?) change:

Number Of Check-ins: 4890
Number Of Files: 749

to:
Number Of Files: 749 (4890 commits)

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to