tvl-depot/third_party
sterni 3d2e55ad53 refactor(mime4cl): replace *-input-adapter-stream with flexi-streams
The input adapter streams were input streams yielding either binary or
character data that could be constructed from a variable data source.
The stream would take care not to destroy the underlying data
source (i.e. not close it if it was a stream), so similar to with
FILE-PORTIONs, but simpler.

Unfortunately, the implementation was quite inefficient: They are
ultimately defined in terms of a function that retrieves the next
character in the source. This only allows for an implementation of
READ-CHAR (and READ-BYTE). Thanks to cl/8559, READ-SEQUENCE can be used
on e.g. FILE-PORTION, but this was still negated by a input adapter
based on one—then, READ-SEQUENCE would need to fall back on READ-CHAR or
READ-BYTE again.

Luckily, we can replace BINARY-INPUT-ADAPTER-STREAM and
CHARACTER-INPUT-ADAPTER-STREAM with a much simpler abstraction: Instead
of extra stream classes, we have a function, MAKE-INPUT-ADAPTER, which
returns an appropriate instance of FLEXI-STREAM based on a given source.
This way, the need for a distinction between binary and character input
adapter is eliminated, since FLEXI-STREAMS supports both binary and
character reads (external format is not yet handled, though).
Consequently, the :binary keyword argument to MIME-BODY-STREAM can be
dropped.

flexi-streams provides stream classes for everything except a stream
that doesn't close the underlying one. Since we have already implemented
this in POSITIONED-FLEXI-INPUT-STREAM, we can split this functionality
into a new superclass ADAPTER-FLEXI-INPUT-STREAM.

This change also allows addressing the performance regression
encountered in cl/8559: It seems that flexi-streams performs worse when
we are reading byte by byte or char by char. (After this change mblog is
still two times slower than on r/6150.) By eliminating the adapter
streams, we can start utilizing READ-SEQUENCE via decoding code that
supports it (i.e. qbase64) and bring performance on par with r/6150
again. Surely there are also ways to gain back even more performance
which has to be determined using profiling. Buffering more aggressively
seems like a sure bet, though.

Switching to flexi-streams still seems like a no-brainer, as it allows
us to drop a lot of code that was quite hacky (e.g. DELIMITED-INPUT-
STREAM) and implements en/decoding handling we did not support before,
but would need for improved correctness.

Change-Id: Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8581
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2023-05-18 16:14:38 +00:00
..
agenix feat(3p/agenix): update to 2022-05-16 and add to niv 2022-05-25 15:00:37 +00:00
alsi chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
bat_syntaxes chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
buzz chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
cgit style(3p/cgit): move commit decorations left of subject 2022-06-22 10:41:39 +00:00
clj2nix chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
elmPackages_0_18 chore(3p/sources): Bump channels & overlays 2022-12-24 12:42:41 +00:00
emacs/rcirc chore(3p/emacs): Remove unused 'explain-pause-mode' derivation 2021-10-10 11:02:07 +00:00
exwm subtree(3p/exwm): Update to commit 'e43bd782' 2022-03-30 11:25:33 +02:00
gerrit refactor(3p/gerrit*): make deps tarball a subtarget 2023-04-26 15:40:11 +00:00
gerrit-queue chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
gerrit_plugins chore(3p/sources): Bump channels & overlays 2023-04-26 15:40:11 +00:00
git chore(3p/sources): Bump channels & overlays 2022-05-04 16:18:50 +00:00
gitignoreSource style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
gopkgs style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
hii chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00
irccat chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
josh chore(3p/sources): Bump channels & overlays 2023-03-27 14:32:31 +00:00
kernelPatches/trx40_usb_audio feat(3p/kernelPatches): Add kernel audio patch for ASUS TRX40 Pro 2020-06-20 22:27:03 +00:00
lisp refactor(mime4cl): replace *-input-adapter-stream with flexi-streams 2023-05-18 16:14:38 +00:00
naersk chore(3p/naersk): Bump and fetch via niv instead 2022-05-26 00:00:42 +00:00
napalm feat(3p): add napalm 2022-11-26 15:38:28 +00:00
nixpkgs chore(3p/nixpkgs): ntfy builds in unstable again 2023-04-26 15:45:56 +00:00
nsfv feat(3p/nsfv): Add derivation for NSFV 2020-06-25 02:27:38 +00:00
overlays chore(3p/sources): Bump channels & overlays 2023-03-21 01:31:48 +00:00
prometheus-fail2ban-exporter chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
public-inbox feat(3p/public-inbox): always set list-id when ingesting in watch 2023-01-29 11:10:54 +00:00
python/broadlink style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
rust-crates chore(3p/rust-crates): chrono: 0.4.19 -> 0.4.22 2022-10-02 12:36:14 +00:00
rustsec-advisory-db chore(3p/rustsec-advisory-db): track using niv 2022-02-13 18:42:44 +00:00
smtprelay chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
sources chore(3p/sources): bump channels and overlays 2023-05-12 12:50:59 +00:00
terraform-provider-glesys chore(3p/sources): Bump channels & overlays 2022-09-28 08:02:31 +00:00
default.nix fix: use localSystem over builtins.currentSystem where appropriate 2022-11-12 21:54:45 +00:00
README.md docs(third_party): Add README 2019-06-29 14:12:38 +01:00

Third-Party Code

Code under this folder is one of the following:

  1. Externally developed dependencies which have been imported ("vendored") into this repository. These dependencies come with their own licenses and whatever else.

  2. Code that is developed inside of this repository, but released to an external repository via Copybara.