On 18 Dec 2014 14:15, "Dmitry Gutov" <dgutov@yandex.ru> wrote:
>
> On 12/18/2014 05:47 PM, Artur Malabarba wrote:
>>
>> In retrospect, the cleanest way to do do all this would have been to
>> build this reloading into `require' and `provide' (something would
>
>
> I dunno, seems like if `require' has to consult `find-library-name' each time, it would lower its performance.
>
> Maybe even perceptibly, since it's called a lot.

There's a way we can implement this so that find library and file-truename have to be called exactly once per require (and file-truename is called once per provide).
Yes, there will be a performance hit, but one could argue that is the way require should have been done from the start (the "right way").

I don't think this performance hit will be noticeable during regular package loading. How expensive is it to call find-library and file-truename once per require, compared to the time it takes to actually load (possibly byte-compile) the entire library that's calling these requires?

The performance difference will certainly be noticeable during package-initialize. Like I mentioned above, that's an important issue.