Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.buildout
Commits
e621a0ce
Commit
e621a0ce
authored
Jan 16, 2012
by
Ross Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid sorting the working set and requirements when it won't be logged.
Backport 124059 from trunk.
parent
a8cbb422
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
CHANGES.txt
CHANGES.txt
+7
-0
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+9
-0
No files found.
CHANGES.txt
View file @
e621a0ce
...
@@ -4,6 +4,13 @@ Change History
...
@@ -4,6 +4,13 @@ Change History
1.4.5 (unreleased)
1.4.5 (unreleased)
==================
==================
- Avoid sorting the working set and requirements when it won't be
logged. When profiling a simple buildout with 10 parts with
identical and large working sets, this resulted in a decrease of run
time from 93.411 to 15.068 seconds, about a 6 fold improvement. To
see the benefit be sure to run without any increase in verbosity
("-v" option). (rossp)
- Introduce a cache for the expensive `buildout._dir_hash` function.
- Introduce a cache for the expensive `buildout._dir_hash` function.
- Remove duplicate path from script's sys.path setup.
- Remove duplicate path from script's sys.path setup.
...
...
src/zc/buildout/easy_install.py
View file @
e621a0ce
...
@@ -1200,6 +1200,15 @@ class MissingDistribution(zc.buildout.UserError):
...
@@ -1200,6 +1200,15 @@ class MissingDistribution(zc.buildout.UserError):
return
"Couldn't find a distribution for %r."
%
str
(
req
)
return
"Couldn't find a distribution for %r."
%
str
(
req
)
def
_log_requirement
(
ws
,
req
):
def
_log_requirement
(
ws
,
req
):
if
not
logger
.
isEnabledFor
(
logging
.
DEBUG
):
# Sorting the working set and iterating over it's requirements
# is expensive, so short cirtuit the work if it won't even be
# logged. When profiling a simple buildout with 10 parts with
# identical and large working sets, this resulted in a
# decrease of run time from 93.411 to 15.068 seconds, about a
# 6 fold improvement.
return
ws
=
list
(
ws
)
ws
=
list
(
ws
)
ws
.
sort
()
ws
.
sort
()
for
dist
in
ws
:
for
dist
in
ws
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment