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
Rafael Monnerat
slapos.buildout
Commits
85bdc124
Commit
85bdc124
authored
Dec 10, 2014
by
Kazuhiko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache _open() result in zc/buildout/buildout.py to accelerate extends.
parent
4d6a8c28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
CHANGES.SlapOS.txt
CHANGES.SlapOS.txt
+5
-0
setup.py
setup.py
+1
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+5
-0
No files found.
CHANGES.SlapOS.txt
View file @
85bdc124
1.7.1-dev-SlapOS-004
--------------------
- Cache _open() result in zc/buildout/buildout.py to accelerate extends.
1.7.1-dev-SlapOS-003
1.7.1-dev-SlapOS-003
--------------------
--------------------
...
...
setup.py
View file @
85bdc124
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#
#
##############################################################################
##############################################################################
name
=
"zc.buildout"
name
=
"zc.buildout"
version
=
"1.7.1-dev-SlapOS-00
3
"
version
=
"1.7.1-dev-SlapOS-00
4
"
import
os
import
os
from
setuptools
import
setup
from
setuptools
import
setup
...
...
src/zc/buildout/buildout.py
View file @
85bdc124
...
@@ -1691,6 +1691,7 @@ def _save_options(section, options, f):
...
@@ -1691,6 +1691,7 @@ def _save_options(section, options, f):
for
option
in
sorted
(
options
.
keys
()):
for
option
in
sorted
(
options
.
keys
()):
_save_option
(
option
,
options
.
get
(
option
),
f
)
_save_option
(
option
,
options
.
get
(
option
),
f
)
_open_result_cache
=
{}
def
_open
(
base
,
filename
,
seen
,
dl_options
,
override
,
downloaded
):
def
_open
(
base
,
filename
,
seen
,
dl_options
,
override
,
downloaded
):
"""Open a configuration file and return the result as a dictionary,
"""Open a configuration file and return the result as a dictionary,
...
@@ -1730,6 +1731,9 @@ def _open(base, filename, seen, dl_options, override, downloaded):
...
@@ -1730,6 +1731,9 @@ def _open(base, filename, seen, dl_options, override, downloaded):
base
=
os
.
path
.
dirname
(
filename
)
base
=
os
.
path
.
dirname
(
filename
)
downloaded
.
add
(
filename
)
downloaded
.
add
(
filename
)
if
filename
in
_open_result_cache
:
return
_open_result_cache
[
filename
]
if
filename
in
seen
:
if
filename
in
seen
:
if
is_temp
:
if
is_temp
:
fp
.
close
()
fp
.
close
()
...
@@ -1790,6 +1794,7 @@ def _open(base, filename, seen, dl_options, override, downloaded):
...
@@ -1790,6 +1794,7 @@ def _open(base, filename, seen, dl_options, override, downloaded):
result
=
_update
(
eresult
,
result
)
result
=
_update
(
eresult
,
result
)
seen
.
pop
()
seen
.
pop
()
_open_result_cache
[
filename
]
=
result
return
result
return
result
...
...
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