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

Bug#871835: speed up for debootstrap



>>>>> On Thu, 7 Sep 2017 18:28:33 +0200, Tiago Ilieve <tiago.myhro@gmail.com> said:

    > Do you mind to share how you identified those slower parts of the
    > code? Have you used a profiler or a similar tool?
I didn't used a profiler. I just look at the code and saw that the
/var/lib/dpkg/available files is read several times, and that often
only certains lines are needed. Using grep is much faster that doing
this with perl. I also replaced a loop with a perl hash and moved an
expression which always evaluates to the same value out of a loop.
But read the commit mails of the patches, they explain a lot in
detail.

I also tried to optimize some perl regex, but my tests didn't gain a
notable improvement, so if left the regex unchanged.
-- 
regards Thomas


Reply to: