sqlite3 database in macports

Joshua Root jmr at macports.org
Wed Jun 12 12:35:23 UTC 2019


On 2019-6-12 14:17 , Mihir Luthra wrote:
> hi,
> 
> i just wanted to ask a small question.
> Is the sqlite3 database used in macports in memory? I don't have a nice
> knowledge about databases. The main question concerning me is the time
> taken by darwintrace calls to tracelib and querying of registry. This
> may make a lot of difference if called on a machine with ssd, hdd or
> fusion drive. Not really sure about this. 

The database lives on disk in ${portdbpath}/registry/registry.db. It has
to, or we wouldn't have the D in ACID [1].

An SQL database is likely not optimal for the access pattern of trace
mode. Using another way of looking up file ownership would be a good
direction to explore. Perhaps also look at doing more caching if
possible, of negative results as well as positive.

And most importantly, do some profiling so you know what is actually
taking the time. Even if you just print out a bunch of timestamps at
different places you at least know something.

- Josh

[1] https://en.wikipedia.org/wiki/ACID_(computer_science)


More information about the macports-dev mailing list