Commit graph

33746 commits

Author SHA1 Message Date
andrew
7b4cfab08b Added a comment 2019-01-04 12:49:51 +00:00
Joey Hess
40db44da19
format 2019-01-04 00:38:03 -04:00
Chymera
aef47a57d7 Added a comment 2019-01-04 03:52:22 +00:00
andrew
78cf95cd86 Added a comment 2019-01-03 23:48:03 +00:00
Chymera
6c1cf18a27 Added a comment 2019-01-03 22:56:25 +00:00
Joey Hess
2b27717c20
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-03 16:12:32 -04:00
Joey Hess
56e2712376
update 2019-01-03 16:12:02 -04:00
Joey Hess
e3c410cc77
devblog 2019-01-03 16:11:57 -04:00
Chymera
55bd348dd5 removed 2019-01-03 19:43:53 +00:00
Chymera
9220561ce5 Added a comment 2019-01-03 19:43:24 +00:00
Chymera
7d0054b174 Added a comment 2019-01-03 19:40:22 +00:00
Chymera
35ef2e5c60 Added a comment 2019-01-03 19:33:02 +00:00
Joey Hess
ef8ddaa713
attoparsec parser for presence logs 2019-01-03 15:27:29 -04:00
colin.brosseau@d444b2b3412af38b85f7b4b340b9c44a412b5698
938ca1c698 Added a comment: NTFS Make it clear that it'll not work with annex.thin 2019-01-03 18:04:58 +00:00
Joey Hess
bfc9039ead
convert git-annex branch access to ByteStrings and Builders
Most of the individual logs are not converted yet, only presense logs
have an efficient ByteString Builder implemented so far. The rest
convert to and from String.
2019-01-03 13:21:48 -04:00
Joey Hess
53905490df
convert Git.HashObject to use ByteStrings
Both lazy and strict, because sometimes it's more efficient to build a
small strict bytestring, and other times better to lazily stream.
2019-01-03 13:21:01 -04:00
Joey Hess
7d51b0c109
import Utility.FileSystemEncoding in Common 2019-01-03 11:37:02 -04:00
ka7
328773f807 Added a comment: (better formating..) 2019-01-03 14:15:21 +00:00
ka7
7092fe9c1a Added a comment: got it 2019-01-03 14:10:19 +00:00
CandyAngel
a9d85d2993 Added a comment 2019-01-03 12:29:41 +00:00
ka7
934a1176cd 2019-01-03 11:17:31 +00:00
Joey Hess
f574d8af10
comment typo 2019-01-03 00:22:05 -04:00
andrew
d2062ed057 Added a comment 2019-01-03 01:32:28 +00:00
Ilya_Shlyakhter
6835cd3957 asked about per-branch git-annex branches 2019-01-02 21:12:13 +00:00
Joey Hess
1aebc356e4
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-02 16:18:30 -04:00
Joey Hess
384eda5af7
devblog 2019-01-02 16:18:06 -04:00
insec
3c21b0fef7 2019-01-02 20:03:42 +00:00
chocolate.camera@ec2ecab153906be21ac5f36652c33786ad0e0b60
79820eb072 2019-01-02 19:36:21 +00:00
kirelagin@6d93475882c55a329fedae6be1971868a775ec7e
2122de1ad6 2019-01-02 17:37:57 +00:00
Joey Hess
3ba6e9bb96
use attoparsec parser for String parsing, 10x speedup
This is not as efficient as using ByteStrings throughout, but converting
the String to ByteString is actually significantly faster than the old
parser.

    benchmarking parse/old
    time                 9.657 μs   (9.600 μs .. 9.732 μs)
                         1.000 R²   (0.999 R² .. 1.000 R²)
    mean                 9.703 μs   (9.645 μs .. 9.785 μs)
    std dev              231.6 ns   (161.5 ns .. 323.7 ns)
    variance introduced by outliers: 25% (moderately inflated)

    benchmarking parse/new
    time                 834.6 ns   (797.1 ns .. 886.9 ns)
                         0.987 R²   (0.976 R² .. 0.999 R²)
    mean                 816.4 ns   (802.7 ns .. 845.1 ns)
    std dev              62.39 ns   (37.66 ns .. 108.4 ns)
    variance introduced by outliers: 82% (severely inflated)

There is a small behavior change from the old parsePOSIXTime,
which accepted any amount of trailing whitespace after the timestamp.
That behavior was not documented, and it doesn't seem anything relied on it.
2019-01-02 13:28:44 -04:00
Joey Hess
3c74dcd4e1
attoparsec parser for POSIXTime
(Not yet used anywhere.)

Benchmarking

{-# LANGUAGE OverloadedStrings #-}

import Criterion.Main
import Utility.TimeStamp
import Data.Attoparsec.ByteString

main = defaultMain
	[ bgroup "parse"
		[ bench "new" $ whnf (parseOnly (parserPOSIXTime <* endOfInput)) "1431286201.113452s"
		, bench "old" $ whnf parsePOSIXTime "1431286201.113452s"
		]
	]

benchmarking parse/new
time                 643.6 ns   (640.2 ns .. 646.7 ns)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 645.3 ns   (642.1 ns .. 650.9 ns)
std dev              14.59 ns   (9.194 ns .. 22.07 ns)
variance introduced by outliers: 29% (moderately inflated)

benchmarking parse/old
time                 9.657 μs   (9.600 μs .. 9.732 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 9.703 μs   (9.645 μs .. 9.785 μs)
std dev              231.6 ns   (161.5 ns .. 323.7 ns)
variance introduced by outliers: 25% (moderately inflated)

So old took 9703 ns to parse, and new 643 ns.
2019-01-02 12:48:53 -04:00
Woazboat
8e019f4752 2019-01-02 16:31:30 +00:00
kirelagin@6d93475882c55a329fedae6be1971868a775ec7e
a2565ad514 2019-01-02 14:34:46 +00:00
Chymera
c32d8dbc83 Added a comment 2019-01-02 12:08:19 +00:00
Joey Hess
ba2c0663f9
comments 2019-01-01 22:48:14 -04:00
Joey Hess
ec1b9da72f
avoid abusing from/toRawFilePath for non-FilePaths 2019-01-01 22:44:04 -04:00
yarikoptic
944c0cab90 Added a comment: the build details 2019-01-02 01:14:39 +00:00
duncan_bayne
c992b20c2b Added a comment: Thanks 2019-01-01 22:26:45 +00:00
Joey Hess
24d6ec40dc
Merge branch 'master' of ssh://git-annex.branchable.com 2019-01-01 16:42:29 -04:00
Joey Hess
fdc90d7214
devblog 2019-01-01 16:41:59 -04:00
Joey Hess
894716512d
add a UUIDDesc type containing a ByteString
Groundwork for handling uuid.log using ByteString
2019-01-01 16:17:54 -04:00
andrew
d849ee579f Added a comment 2019-01-01 20:02:58 +00:00
andrew
e0533176c1 2019-01-01 19:49:07 +00:00
Joey Hess
b781fbcccf
update copyright year 2019-01-01 15:37:40 -04:00
andrew
faffe4c8b9 Added a comment 2019-01-01 19:36:35 +00:00
andrew
38a7d7e779 Added a comment 2019-01-01 19:00:08 +00:00
Joey Hess
b3c69eaaf8
strict bytestring encoders and decoders
Only had lazy ones before.

Already sped up a few parts of the code.
2019-01-01 14:55:15 -04:00
andrew
87af69903d Added a comment 2019-01-01 18:47:59 +00:00
Joey Hess
9cc6d5549b
convert UUID from String to ByteString
This should make == comparison of UUIDs somewhat faster, and perhaps a
few other operations around maps of UUIDs etc.

FromUUID/ToUUID are used to convert String, which is still used for all
IO of UUIDs. Eventually the hope is those instances can be removed,
and all git-annex branch log files etc use ByteString throughout, for a
real speed improvement.

Note the use of fromRawFilePath / toRawFilePath -- while a UUID usually
contains only alphanumerics and so could be treated as ascii, it's
conceivable that some git-annex repository has been initialized using
a UUID that is not only not a canonical UUID, but contains high unicode
or invalid unicode. Using the filesystem encoding avoids any problems
with such a thing. However, a NUL in a UUID seems extremely unlikely,
so I didn't use encodeBS / decodeBS to avoid their extra overhead in
handling NULs.

The Read/Show instance for UUID luckily serializes the same way for
ByteString as it did for String.
2019-01-01 14:45:33 -04:00
chocolate.camera@ec2ecab153906be21ac5f36652c33786ad0e0b60
508396879b Added a comment 2019-01-01 18:17:21 +00:00