mirror of
https://github.com/facebook/sapling.git
synced 2024-10-13 02:07:31 +03:00
b168277429
Summary: Non-demandimport-based importing of `util` costs ~0.3s. Replacing it with importing `posix` or `windows` reduces the cost to ~0.1s, but having a dedicated module for this one purpose, setting the `executedfrombinary` flag, just shaves the cost completely off. Reviewed By: mitrandir77 Differential Revision: D10478778 fbshipit-source-id: e69e92351c1b9b3ab23c291bf8b50f9e3af1f13f
12 lines
327 B
Python
12 lines
327 B
Python
# Copyright 2018-present Facebook. All Rights Reserved.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
executedfrombinary = False
|
|
|
|
|
|
def setbinaryexecution(isbinary=False):
|
|
global executedfrombinary
|
|
executedfrombinary = isbinary
|