Re: [PATCH] Optimization to avoid scanning all .pc files

Matthew Hanna (BLOOMBERG/ 731 LEX) mhanna21 at bloomberg.net
Fri Sep 9 21:08:04 UTC 2016


Results of tests of this patch on our system are mixed.  The optimization does
not appear to be needed on our Linux boxes.  The time to read our pkgconfig
directory is in the milliseconds.  On other platforms, the time is in seconds,
so I was hopeful that this patch would reduce that time.  It certainly reduces
the minimum speed, but the maximum speed is actually increased.  In one test,
the time without the patch is 2 seconds, with almost all of that time taken up
by the directory reading.  With the patch, the minimum time is now in
milliseconds for a low level library with few dependencies, but is now over 5
seconds for a higher level library.

From: marcodiegomesquita at gmail.com At: 08/27/16 10:53:48
To: Matthew Hanna (BLOOMBERG/ 731 LEX), nicholson at endlessm.com
Cc: pkg-config at lists.freedesktop.org
Subject: Re: [PATCH] Optimization to avoid scanning all .pc files

Hi Devs!


Attached is just a small improvement to the patch: code improvements
and path_position calculation is smarter. I think it is now good to
go.

Please review it.


On Fri, Aug 26, 2016 at 10:04 PM, Marco Diego Aurélio Mesquita
<marcodiegomesquita at gmail.com> wrote:
> Hi Matthew!
>
> Thanks for the review. The attached patch implements the changes you asked.
>
> Is there anything else that should be changed?
>
> On Fri, Aug 26, 2016 at 8:25 PM, Matthew Hanna (BLOOMBERG/ 731 LEX)
> <mhanna21 at bloomberg.net> wrote:
>> --- Original Sender: INTERNET2 .PROG/MSG/INT, BLOOMBERG/ 330 WEST ---
>>
>> The call to 'access' should be replaced by 'g_file_test' for portability and/or platform optimization.
>>
>> Are there whitespace changes in the diff?  If so, please remove.  It makes the diff very hard to read.
>>
>> ---
>> Sent from Bloomberg Professional for Android
>>
>>
>> ----- Original Message -----
>> FROM: Marco Diego Aurélio Mesquita <marcodiegomesquita at gmail.com>
>> At: 27-Aug-2016 01:03:59
>>
>> Hi devs!
>>
>> The attached patch improves pkg-config so that it will look for
>> required .pc files only, instead of loading and parsing all known .pc
>> files.
>>
>> Please review it.
>>
>> ----------------------------
>>
>> _______________________________________________
>> pkg-config mailing list
>> pkg-config at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/pkg-config
>> _______________________________________________
>> pkg-config mailing list
>> pkg-config at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/pkg-config


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pkg-config/attachments/20160909/e9fdcced/attachment.html>


More information about the pkg-config mailing list