Only gc.collect() under windows#686
Merged
Byron merged 1 commit intogitpython-developers:masterfrom Nov 2, 2017
Merged
Conversation
Under Windows, tempfile objects are holding references to open files until the garbage collector closes them and frees them. Explicit calls to gc.collect() were added to the finalizer for the Repo class to force them to be closed synchronously. However, this is expensive, especially in large, long-running programs. As a temporary measure to alleviate the performance regression on other platforms, only perform these calls when running under Windows. Fixes gitpython-developers#553
openstack-gerrit
pushed a commit
to openstack-infra/zuul
that referenced
this pull request
Oct 10, 2017
Timeout remote git operations after 300 seconds. Because it could be in an invalid state, delete the local repo if a timeout occurs (subsequent operations will recreate it). This replaces our use of the clone_from() and fetch() methods from GitPython with lower-level equivalents. The high-level methods do not currently permit the hard timeout. The GitPython requirement is changed to a temporary fork until both gitpython-developers/GitPython#682 and gitpython-developers/GitPython#686 end up in a release. Change-Id: I7f680472a8d67ff2dbe7956a8585fb3714119e65
Member
|
Thanks a lot for this fix! |
riley-martine
pushed a commit
to riley-martine/GitPython
that referenced
this pull request
Dec 7, 2023
Only gc.collect() under windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under Windows, tempfile objects are holding references to open files
until the garbage collector closes them and frees them. Explicit
calls to gc.collect() were added to the finalizer for the Repo class
to force them to be closed synchronously. However, this is expensive,
especially in large, long-running programs. As a temporary measure
to alleviate the performance regression on other platforms, only
perform these calls when running under Windows.
Fixes #605