git-annex/Annex
Joey Hess 1cd02762bf
Optimisations to git-annex branch query and setting, avoiding repeated copies of the environment.
Speeds up commands like  "git-annex find --in remote" by over 50%.

Profiling showed that adjustGitEnv was 21% of the time and 37% of the
allocations of that command. It copied the environment each time with
getEnvironment.

The only repeated use of adjustGitEnv is in withIndexFile, which tends to
be run at least once per file. So, it was optimised by keeping a cache of
the environment, which can be reused.

There could be other better ways to optimise this. Maybe get the while
environment once at startup. But, then it would have to be serialized back
out each time running a child process, so I doubt that would be a net win.

It might be better to cache a version of the environment that is
pre-modified to use .git-annex/index. But, profiling doesn't show that
modifying the enviroment is taking any significant time.
2016-09-29 13:36:48 -04:00
..
Branch Unneded constraint 2016-01-28 12:34:07 -04:00
Content remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
LockPool clarify 2016-03-01 16:22:47 -04:00
MetaData update my email address and homepage url 2015-01-21 12:50:09 -04:00
View remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Action.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
AdjustedBranch.hs fix bugs in handing of deep branches with sync and adjusted branches 2016-09-21 15:23:47 -04:00
AutoMerge.hs Fix bad automatic merge conflict resolution between an annexed file and a directory with the same name when in an adjusted branch. 2016-06-07 12:53:35 -04:00
BloomFilter.hs Another redundant constraint 2016-01-28 12:34:07 -04:00
Branch.hs Speed up startup time by caching the refs that have been merged into the git-annex branch. 2016-07-17 12:24:34 -04:00
BranchState.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
CatFile.hs Optimisations to git-annex branch query and setting, avoiding repeated copies of the environment. 2016-09-29 13:36:48 -04:00
CheckAttr.hs annex.largefiles can be configured in .gitattributes too 2016-02-02 15:18:17 -04:00
CheckIgnore.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Common.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Concurrent.hs Sped up git-annex add in direct mode and v6 by using git hash-object --batch. 2016-03-14 15:58:46 -04:00
Content.hs make --json-progress work for url downloads 2016-09-09 16:15:39 -04:00
Difference.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Direct.hs assistant: Deal with upcoming git's refusal to merge unrelated histories by default 2016-04-22 14:26:44 -04:00
DirHashes.hs followup 2016-09-29 11:33:42 -04:00
Drop.hs --branch, stage 2 2016-07-20 15:23:43 -04:00
Environment.hs also avoid crashing in most circumstances if unable to determine the username 2016-06-08 15:04:15 -04:00
FileMatcher.hs Include magic database in the linux and OSX standalone builds. 2016-02-26 11:54:15 -04:00
Fixup.hs avoid warnings about not exported System.Directory.isSymbolicLink 2016-04-28 15:18:11 -04:00
GitOverlay.hs Optimisations to git-annex branch query and setting, avoiding repeated copies of the environment. 2016-09-29 13:36:48 -04:00
HashObject.hs Sped up git-annex add in direct mode and v6 by using git hash-object --batch. 2016-03-14 15:58:46 -04:00
Hook.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Ingest.hs Make git clean filter preserve the backend that was used for a file. 2016-06-09 15:17:08 -04:00
Init.hs fix build on windows 2016-06-13 14:54:34 -04:00
InodeSentinal.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Journal.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Link.hs Preserve execute bits of unlocked files in v6 mode. 2016-04-14 14:47:08 -04:00
Locations.hs Optimisations to time it takes git-annex to walk working tree and find files to work on. Sped up by around 18%. 2016-09-26 16:48:57 -04:00
LockFile.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
LockPool.hs pid locking configuration and abstraction layer for git-annex 2015-11-12 17:50:34 -04:00
MakeRepo.hs Use git-annex init --version=6 to get v6 for now 2015-12-15 17:17:13 -04:00
MetaData.hs Added metadata --batch option, which allows getting, setting, deleting, and modifying metadata for multiple files/keys. 2016-07-27 10:46:25 -04:00
Notification.hs get, move, copy, mirror: Added --failed switch which retries failed copies/moves 2016-08-03 12:37:12 -04:00
NumCopies.hs handle SomeAsyncException same as AsyncException 2016-06-20 10:31:47 -04:00
Path.hs Fix bug introduced in the last release that broke git-annex sync when git-annex was installed from the standalone tarball. 2015-03-27 12:55:18 -04:00
Perms.hs fsck: Warn when core.sharedRepository is set and an annex object file's write bit is not set and cannot be set due to the file being owned by a different user. 2016-04-14 15:36:53 -04:00
Queue.hs withAltRepo needs a separate queue of changes 2016-06-03 13:57:00 -04:00
Quvi.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
ReplaceFile.hs Windows: Fix an over-long temp directory name. 2016-05-06 12:49:41 -04:00
SpecialRemote.hs Pass the various gnupg-options configs to gpg in several cases where they were not before. 2016-05-23 17:03:20 -04:00
Ssh.hs Fix bug that prevented annex.sshcaching=false configuration from taking effect when on a crippled filesystem. Thanks, divergentdave. 2016-04-20 14:43:43 -04:00
TaggedPush.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Transfer.hs disentangle concurrency and message type 2016-09-09 12:57:42 -04:00
Url.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
UUID.hs When built with ut uid-1.3.12, generate more random UUIDs than before 2016-07-27 07:46:08 -04:00
VariantFile.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Version.hs Avoid any access to keys database in v5 mode repositories, which are not supposed to use that database. 2016-07-19 12:12:19 -04:00
View.hs Fix crash when entering/changing view in a subdirectory of a repo that has a dotfile in its root. 2016-05-17 13:49:10 -04:00
Wanted.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
WorkTree.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00