Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached revisions #115

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Cached revisions #115

wants to merge 8 commits into from

Conversation

lukaszb
Copy link
Member

@lukaszb lukaszb commented May 3, 2013

Please check if I haven't omit anything.

@lukaszb
Copy link
Member Author

lukaszb commented May 3, 2013

@marcinkuzminski if you can, please fix problem with gzip not having contextmanager in older pythons. Otherwise I'll fix that tomorrow.

@lukaszb
Copy link
Member Author

lukaszb commented May 4, 2013

So, there is still documentation missing. After adding it we can probably merge this

@marcinkuzminski
Copy link
Member

I have few comments:

  • i don't like the fact that both lockfile and cache puts their files in the workdir, making it dirty after that
  • how are the cases of starting >1 repo simultaneously handled with the lockfile ?
  • what happens if the lock is not released (eg. you kill vcs before cache is made, i think it leaves the lockfile)

i'm asking so maybe you know the answer now, else we need to test that

@lukaszb
Copy link
Member Author

lukaszb commented May 9, 2013

  1. This is initial idea. It's simply to ignore those files as we do with so many others. The problem with having those outside of the repository is: how we would identify different repositories with same names?
  2. Well, dogpile effect problem has to be checked indeed.
  3. It's not cleared when the process is killed unfortunately. But I guess it's external application problem to make sure locks are cleared. We can also add timeout and raise exception if it take too long to acquire a lock.

The other thing is that we haven't actually check the performance improvement. For relatively small repositories (~5k commits) the difference is very small. For repository with 20k commits the difference is significant (almost twice as fast). Haven't tried with larger repos.

@marcinkuzminski
Copy link
Member

re1. i mean on each repo i run this it make the workdir dirty, i think simple enought would be to store those files inside .hg dir for Mercurial or .git dir for Git (unless it's a bare repo, then at top level

re3 - we could switch to pid-lock it's basically storing the PID inside lock file, if lockfile is there, but pid is not, lock is obsolete and get's rewritten

twice fast for 20K commit repo sounds nice !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants