mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
30d1d145d8
Summary: Update the phabricator/conduit.py module to cache connections to Phabricator and re-use them, rather than creating a brand new connection each time call_conduit() is invoked. This makes the `{phabstatus}` template reasonable to use outside of the smartlog extension. There was already custom logic for smartlog so that it only makes a single conduit call to look up data on all revisions at once. However, generic `log` commands would still end up creating a separate connection to phabricator for each revision. With this change `log` still ends up making one call per revision, but at least it does not set up and tear down a separate connection for each one any more. Test Plan: Tested using the `{phabstatus}` template with `hg log` and confirmed it no longer made a separate connection to phabrictor for each revision. It is still pretty slow, but no longer quite as bad. Reviewers: #mercurial, simonfar, tomaszo Reviewed By: simonfar Subscribers: simonfar, medson, mjpieters, net-systems-diffs@fb.com Differential Revision: https://phabricator.intern.facebook.com/D5383425 Signature: t1:5383425:1499680847:428185ba762fefbe12a411a1afa0a090aafda2f2 |
||
---|---|---|
.. | ||
__init__.py | ||
arcconfig.py | ||
conduit.py | ||
diffprops.py |