This is an archive of the discontinued Mercurial Phabricator instance.

discovery: move cl.hasnode outside of the for-loop
ClosedPublic

Authored by pulkit on Mar 17 2019, 11:49 AM.

Details

Summary

IIUC, resolving attributes for changelog can lead to some overhead. So this
patch moves that to outside of a for-loop.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Mar 17 2019, 11:49 AM

The series looks good to me after a very quick review. I think a more in-deep review will be necessary.

@pulkit Do you have measured some performance improvement with this series?

The series looks good to me after a very quick review. I think a more in-deep review will be necessary.
@pulkit Do you have measured some performance improvement with this series?

I didn't. I am not sure whether this will have any significant performance benefit. I will try to have some numbers.

@lothiraldan There is no significant performance benefit which I am able to notice. There is minor improvement of around 0.2 sec on our large repo but that is not stable.

I was reviewing one of the patches when I saw this code and found it needs some cleanup and did that.

This revision was automatically updated to reflect the committed changes.