Hi Pietro,

Please check out my branch:

[EMAIL PROTECTED]:/tmp$ git clone 
git://git.debian.org/git/pkg-python-debian/python-debian.git
Initialized empty Git repository in /tmp/python-debian/.git/
remote: Counting objects: 1209, done.
remote: Compressing objects: 100% (338/338), done.
remote: Total 1209 (delta 858), reused 1198 (delta 853)
Receiving objects: 100% (1209/1209), 341.36 KiB | 263 KiB/s, done.
Resolving deltas: 100% (858/858), done.
[EMAIL PROTECTED]:/tmp$ cd python-debian/
[EMAIL PROTECTED]:/tmp/python-debian$ git checkout 
origin/jsw/apt-pkg-without-shared-storage
Note: moving to "origin/jsw/apt-pkg-without-shared-storage" which isn't a local 
branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at f8c3ca7... Add a use_apt_pkg parameter to Deb822.iter_paragraphs

I have added a use_apt_pkg parameter to the iter_paragraphs method, and
changed the behavior of the shared_storage parameter.  Now, use_apt_pkg
just turns on or off the usage of the (fast) apt_pkg parser, while
shared_storage determines whether to then copy the parsed data (when
False) or to use apt_pkg's internal Tags objects directly (which is
faster than copying, but results in objects not really being consistent
across iterations, as you found).

For now, both parameters default to True, to match previous behavior.
I'm going to run a few benchmarks to see if it actually makes sense to
default to shared_storage=False, since that's definitely the option that
would cause the fewest surprises.  I think the main speed benefit to
shared_storage previously was that it used apt_pkg's parser, not that it
didn't keep data across iterations.

Anyway, I plan to pull this into the master branch and upload it after
I've tested it a bit more (and probably written a few more unit tests).

Thanks,
-- 
John Wright <[EMAIL PROTECTED]>



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to