Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 198253 Details for
Bug 276813
sys-apps/portage Performance improvement
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use_readlines_when_reading_whole_file.patch
use_readlines_when_reading_whole_file.patch (text/plain), 1.35 KB, created by
Marat Radchenko
on 2009-07-17 06:59:30 UTC
(
hide
)
Description:
use_readlines_when_reading_whole_file.patch
Filename:
MIME Type:
Creator:
Marat Radchenko
Created:
2009-07-17 06:59:30 UTC
Size:
1.35 KB
patch
obsolete
>diff --git a/pym/portage/cache/flat_hash.py b/pym/portage/cache/flat_hash.py >index 71ddf60..3f126c3 100644 >--- a/pym/portage/cache/flat_hash.py >+++ b/pym/portage/cache/flat_hash.py >@@ -29,7 +29,7 @@ class database(fs_template.FsBased): > try: > myf = codecs.open(fp, mode='r', encoding='utf_8', errors='replace') > try: >- d = self._parse_data(myf, cpv) >+ d = self._parse_data(myf.readlines(), cpv) > if '_mtime_' not in d: > # Backward compatibility with old cache > # that uses mtime mangling. >@@ -87,7 +87,6 @@ class database(fs_template.FsBased): > os.remove(fp) > raise cache_errors.CacheCorruption(cpv, e) > >- > def _delitem(self, cpv): > # import pdb;pdb.set_trace() > try: >@@ -98,11 +97,9 @@ class database(fs_template.FsBased): > else: > raise cache_errors.CacheCorruption(cpv, e) > >- > def __contains__(self, cpv): > return os.path.exists(os.path.join(self.location, cpv)) > >- > def __iter__(self): > """generator for walking the dir struct""" > dirs = [self.location] >diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py >index 724dce3..b51bf98 100644 >--- a/pym/portage/cache/metadata.py >+++ b/pym/portage/cache/metadata.py >@@ -34,7 +34,6 @@ class database(flat_hash.database): > > def _parse_data(self, data, cpv): > _hashed_re_match = self._hashed_re.match >- data = list(data) > d = {} > > for line in data:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276813
:
196987
|
197434
|
197437
|
197827
|
198253
|
203267
|
203269
|
203406
|
203509
|
203512
|
203515
|
203519
|
204572
|
204597
|
204673
|
204685
|
204770
|
204883
|
204996
|
205039