[m-rev.] for review: start using --generate-dependencies-ints
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Nov 1 20:00:38 AEDT 2023
On 2023-10-31 23:03 +11:00 AEDT, "Julien Fischer" <jfischer at opturion.com> wrote:
>
> On Sun, 29 Oct 2023, Julien Fischer wrote:
>
>>>> The primary culprit for this
>>>> seems to be all the file copying that is going on.
>>>
>>> How certain is that assertion?
>>
>> Very certain. Each call to module_cmds.copy_file/7 from
>> module_cmds.copy_dot_tmp_to_base_file_create_file/8 is taking on
>> average 500ms on my Windows machine. Indeed, using the "slow"
>> path in copy_file/7, i.e via do_copy_file/5, is *much* faster
>> (~7ms a copy) on the same machine.
>>
>> My guess would be that we actually want to use of the Windows API's
>> file copying functions here; I'll give that a go.
>
> For the sake of completeness, calling CopyFileW() to do the copying
> comes in at < 1ms a copy.
The thing is, the copy_dot_tmp_to_base_file_* predicates should NOT
actually COPY anything. After they compared the contents of the
tmp file and the base file, they should just RENAME the tmp file
to the name of the base file. I think the name of the predicate blinded us
to the simpler and probably faster solution for far too long.
> Zoltan and I had a cat off-line about
> this issue and some others related to how the compiler copies files.
> I will post some proposed changes to m-dev some time in the coming
> week.
For any future mailing list archeologists: what Julien and I had was a *chat*,
not a *cat* :-)
Zoltan.
More information about the reviews
mailing list