diff options
author | Ming Liu <liu.ming50@gmail.com> | 2020-02-01 18:47:20 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-02-03 17:10:58 -0500 |
commit | c1bc3963ba98834c835b780114151d6b31dd0261 (patch) | |
tree | 1bebc664138e78f06a6f1293655a42dd55823b83 /recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch | |
parent | 9124baa325e9ee6994f2688089c9cc564131c2d4 (diff) | |
download | meta-virtualization-c1bc3963ba98834c835b780114151d6b31dd0261.tar.gz |
python3-docker-compose: import fastentrypoints
The docker-compose project is using console_scripts which hence imports
pkg_resources which is very slow at starting time, see:
https://github.com/pypa/setuptools/issues/510
This could be workaround by importing fastentrypoints module.
Some tests:
Before the patch, on a colibri-imx8x machine:
$ time docker-compose
```
real 0m5.108s
user 0m4.761s
sys 0m0.272s
```
After the patch, on a colibri-imx8x machine:
$ time docker-compose
```
real 0m3.526s
user 0m3.249s
sys 0m0.235s
```
Have verified the patch with:
https://docs.docker.com/compose/gettingstarted
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch')
-rw-r--r-- | recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch b/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch new file mode 100644 index 00000000..df613e84 --- /dev/null +++ b/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From f3a22f0f14a4b3313e6405dfb6c97df949493a34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Liu <liu.ming50@gmail.com> | ||
3 | Date: Thu, 30 Jan 2020 17:22:19 +0100 | ||
4 | Subject: [PATCH] setup.py: import fastentrypoints | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE specific configuration] | ||
7 | |||
8 | Signed-off-by: Ming Liu <liu.ming50@gmail.com> | ||
9 | --- | ||
10 | setup.py | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/setup.py b/setup.py | ||
14 | index ad57969..3cccffc 100644 | ||
15 | --- a/setup.py | ||
16 | +++ b/setup.py | ||
17 | @@ -12,7 +12,7 @@ import sys | ||
18 | import pkg_resources | ||
19 | from setuptools import find_packages | ||
20 | from setuptools import setup | ||
21 | - | ||
22 | +import fastentrypoints | ||
23 | |||
24 | def read(*parts): | ||
25 | path = os.path.join(os.path.dirname(__file__), *parts) | ||
26 | -- | ||
27 | 2.7.4 | ||
28 | |||