git-annex/Assistant
Joey Hess fa62c98910
simplify and speed up Utility.FileSystemEncoding
This eliminates the distinction between decodeBS and decodeBS', encodeBS
and encodeBS', etc. The old implementation truncated at NUL, and the
primed versions had to do extra work to avoid that problem. The new
implementation does not truncate at NUL, and is also a lot faster.
(Benchmarked at 2x faster for decodeBS and 3x for encodeBS; more for the
primed versions.)

Note that filepath-bytestring 1.4.2.1.8 contains the same optimisation,
and upgrading to it will speed up to/fromRawFilePath.

AFAIK, nothing relied on the old behavior of truncating at NUL. Some
code used the faster versions in places where I was sure there would not
be a NUL. So this change is unlikely to break anything.

Also, moved s2w8 and w82s out of the module, as they do not involve
filesystem encoding really.

Sponsored-by: Shae Erisson on Patreon
2021-08-11 12:13:31 -04:00
..
Alert update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Install hush build warning on OSX 2020-11-13 13:34:34 -04:00
Pairing comment typo 2021-04-08 13:08:01 -04:00
Threads simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Types start splitting out readonly values from AnnexState 2021-04-02 15:51:44 -04:00
WebApp simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Alert.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
BranchChange.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Changes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Commits.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Common.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
CredPairCache.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DaemonStatus.hs switch from hslogger to purpose-built Utility.Debug 2021-04-05 13:40:31 -04:00
DeleteRemote.hs auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
Drop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Fsck.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Gpg.hs be stricter about rejecting invalid configurations for remotes 2020-01-10 14:52:48 -04:00
Install.hs finished this stage of the RawFilePath conversion 2020-11-06 14:10:58 -04:00
MakeRemote.hs auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
MakeRepo.hs work around strange auto-init bug 2021-07-30 18:36:03 -04:00
Monad.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
NamedThread.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pairing.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Pushes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RemoteControl.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Repair.hs switch from hslogger to purpose-built Utility.Debug 2021-04-05 13:40:31 -04:00
RepoProblem.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Restart.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
ScanRemotes.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Ssh.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Sync.hs remove direct mode remnant of merging unrelated histories 2021-07-19 11:41:26 -04:00
TransferQueue.hs cache the serialization of a Key 2019-11-22 17:49:16 -04:00
TransferSlots.hs start splitting out readonly values from AnnexState 2021-04-02 15:51:44 -04:00
Unused.hs avoid failure to lock content of removed file causing drop etc to fail 2020-07-25 11:59:33 -04:00
Upgrade.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
WebApp.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00