sqlite3 database in macports

Joshua Root jmr at macports.org
Fri Jun 14 17:24:16 UTC 2019


On 2019-6-13 16:27 , Mihir Luthra wrote:
> In general what I found is, like in port gettext, out of 400,000 calls
> to the sever, 50,000 calls need to get queried through registry.
> Remaining 350,000 are always allowed or always denied prefixes such as /bin.
> Till now I was simply caching any path returned from
> __darwintrace_sandbox_check(). Before I never noticed 350,000 times
> server is asked only for prefixes. This led to many cache miss in case
> of prefix searches.
> When I do caching of all this data, making shared memory capable of
> handling prefixes also. only “300” calls actually go to server. This
> actually means most of the time socket doesn’t even need to get setup.
> Doing this, gettext took (real:11m.9.701s,
> user:12m47.990s,sys:6m51.499s) which is pretty much an improvement
> compared to last time.

Excellent.

> Although due to __darwintrace_setup(), being called every time before
> path lookup, setup gets done every time for no reason. Also path
> normalisation code is mixed up with path lookup . I guess I should try
> and modularise them somehow before next testing.

Yes. It sounds like it would be worth doing the setup on demand.

>     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.
> 
> 
> That really helped.

I thought it might. :)

- Josh


More information about the macports-dev mailing list