Speed up `dub`.

ciechowoj via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 6 01:44:03 PDT 2016


On Sunday, 5 June 2016 at 21:20:20 UTC, Andrej Mitrovic wrote:
> On Thursday, 2 June 2016 at 13:04:00 UTC, ciechowoj wrote:
>> and found that an assert from `std/path.d:3168` (`globMatch`) 
>> contributes a major amount to the running time of dub.
>>
>> ```
>>     assert(balancedParens(pattern, '[', ']', 0));
>>     assert(balancedParens(pattern, '{', '}', 0));
>> ```
>
> Hmm.. that sounds like the dub binary that's distributed is 
> running its unittests at start. If that's true I don't think 
> they should be part of the released binary..

Actually, that assertions are invoked from precondition block of 
`globMatch`. On the other hand `globMatch` is invoked from 
`std.file.dirEntry`. So, I suppose it is fine if it goes about 
unit tests.


More information about the Digitalmars-d-learn mailing list