/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-06 18:05:03 UTC
  • mto: This revision was merged to the branch mainline in revision 4814.
  • Revision ID: john@arbash-meinel.com-20091106180503-q3hcg1nxmut5b2cb
Stop holding the gil while extracting data.

Previous experience has shown that we don't really spend a lot
of time here, but there isn't any reason to hold the lock while
we do it anyway.

Performance testing has shown that for bzr operations 'with nogil'
doesn't really do much, which was generally expected. Any variation
observed is within the noise margins.

This is mostly about 'the right thing to do', and potential
future work where we may actually use threads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1677
1677
        # to filter out empty names because of non rich-root...
1678
1678
        sections = bytes.split('\n')
1679
1679
        kind, file_id = sections[0].split(': ')
1680
 
        return (sections[2], intern(file_id), intern(sections[3]))
 
1680
        return (sections[2], file_id, sections[3])
1681
1681
 
1682
1682
    def _bytes_to_entry(self, bytes):
1683
1683
        """Deserialise a serialised entry."""
1705
1705
            result.reference_revision = sections[4]
1706
1706
        else:
1707
1707
            raise ValueError("Not a serialised entry %r" % bytes)
1708
 
        result.file_id = intern(result.file_id)
1709
 
        result.revision = intern(sections[3])
 
1708
        result.revision = sections[3]
1710
1709
        if result.parent_id == '':
1711
1710
            result.parent_id = None
1712
1711
        self._fileid_to_entry_cache[result.file_id] = result