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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
931a4b73
Commit
931a4b73
authored
Dec 10, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache parser object in zc/buildout/buildout.py:_open() in memory to accelerate extends.
parent
4d6a8c28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
CHANGES.SlapOS.txt
CHANGES.SlapOS.txt
+5
-0
setup.py
setup.py
+1
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+7
-3
No files found.
CHANGES.SlapOS.txt
View file @
931a4b73
1.7.1-dev-SlapOS-004
--------------------
- Cache parser object in zc/buildout/buildout.py:_open() in memory to accelerate extends.
1.7.1-dev-SlapOS-003
--------------------
...
...
setup.py
View file @
931a4b73
...
...
@@ -12,7 +12,7 @@
#
##############################################################################
name
=
"zc.buildout"
version
=
"1.7.1-dev-SlapOS-00
3
"
version
=
"1.7.1-dev-SlapOS-00
4
"
import
os
from
setuptools
import
setup
...
...
src/zc/buildout/buildout.py
View file @
931a4b73
...
...
@@ -1691,6 +1691,7 @@ def _save_options(section, options, f):
for
option
in
sorted
(
options
.
keys
()):
_save_option
(
option
,
options
.
get
(
option
),
f
)
_open_parser_cache
=
{}
def
_open
(
base
,
filename
,
seen
,
dl_options
,
override
,
downloaded
):
"""Open a configuration file and return the result as a dictionary,
...
...
@@ -1741,9 +1742,12 @@ def _open(base, filename, seen, dl_options, override, downloaded):
result
=
{}
parser
=
_open_parser_cache
.
get
(
filename
)
if
parser
is
None
:
parser
=
ConfigParser
.
RawConfigParser
()
parser
.
optionxform
=
lambda
s
:
s
parser
.
readfp
(
fp
)
_open_parser_cache
[
filename
]
=
parser
if
is_temp
:
fp
.
close
()
os
.
remove
(
path
)
...
...
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