start splitting out readonly values from AnnexState
Values in AnnexRead can be read more efficiently, without MVar overhead. Only a few things have been moved into there, and the performance increase so far is not likely to be noticable. This is groundwork for putting more stuff in there, particularly a value that indicates if debugging is enabled. The obvious next step is to change option parsing to not run in the Annex monad to set values in AnnexState, and instead return a pure value that gets stored in AnnexRead.
This commit is contained in:
parent
3204f0bbaa
commit
c2f612292a
20 changed files with 169 additions and 140 deletions
|
@ -35,12 +35,12 @@ type Server = TChan Consumed -> TransportHandle -> IO ()
|
|||
data RemoteRepo = RemoteRepo Git.Repo RemoteGitConfig
|
||||
newtype LocalRepo = LocalRepo Git.Repo
|
||||
|
||||
-- All Transports share a single AnnexState MVar
|
||||
-- All Transports share a single AnnexState MVar and an AnnexRead.
|
||||
--
|
||||
-- Different TransportHandles may have different versions of the LocalRepo.
|
||||
-- (For example, the ssh transport modifies it to enable ssh connection
|
||||
-- caching.)
|
||||
data TransportHandle = TransportHandle LocalRepo (MVar Annex.AnnexState)
|
||||
data TransportHandle = TransportHandle LocalRepo (MVar Annex.AnnexState) Annex.AnnexRead
|
||||
|
||||
-- Messages that the daemon emits.
|
||||
data Emitted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue