)]}'
{"id":"depot~8581","triplet_id":"depot~canon~Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d","project":"depot","branch":"canon","hashtags":[],"change_id":"Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d","subject":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams","status":"MERGED","created":"2023-05-17 22:25:16.000000000","updated":"2023-05-18 16:14:38.000000000","submitted":"2023-05-18 16:14:38.000000000","submitter":{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"8581","meta_rev_id":"c5a3a773cd1d86bd989d620907c4abed983cef00","_number":8581,"virtual_id_number":8581,"owner":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"actions":{},"labels":{"Code-Review":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"tag":"autogenerated:gerrit:merged","value":2,"date":"2023-05-18 16:14:38.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0},"Verified":{"approved":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"tag":"autogenerated:gerrit:merged","value":1,"date":"2023-05-18 16:14:38.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Autosubmit":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"tag":"autogenerated:gerrit:merged","value":1,"date":"2023-05-18 16:14:38.000000000","_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{" 0":"Submit manually","+1":"Submit automatically"},"description":"","default_value":0,"optional":true},"All-Comments-Resolved":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]},"Conformant-Commit-Message":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2023-05-17 22:25:18.000000000","updated_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"state":"CC"},{"updated":"2023-05-17 22:27:42.000000000","updated_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2023-05-18 16:14:38.000000000","updated_by":{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"0eaf13eac041963c103a9643bf69132f89f32279","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2023-05-17 22:25:16.000000000","message":"Uploaded patch set 1: Autosubmit+1.","accounts_in_message":[],"_revision_number":1},{"id":"4f48ebb48e008ca759aaa0e8b0e661d28fa31cb7","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-17 22:25:18.000000000","message":"Patch Set 1:\n\nStarted build for patchset #1 on: https://buildkite.com/tvl/depot/builds/24443","accounts_in_message":[],"_revision_number":1},{"id":"52ae6eaf3d8f10d23eaf066e07e8c6995b83f2f8","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-17 22:27:42.000000000","message":"Patch Set 1: Verified+1\n\nBuild of patchset 1 passed: https://buildkite.com/tvl/depot/builds/24443","accounts_in_message":[],"_revision_number":1},{"id":"71394527678fe2b65adae43bbc53cf1ccca42c87","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2023-05-18 15:36:16.000000000","message":"Uploaded patch set 2.\n\nCopied Votes:\n* Autosubmit+1 (copy condition: \"changekind:NO_CHANGE OR is:ANY\")\n\nOutdated Votes:\n* Verified+1 (copy condition: \"(is:ANY AND changekind:NO_CODE_CHANGE) OR changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":2},{"id":"85766812899d6f927543dc18528b6f1a0b482224","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-18 15:36:18.000000000","message":"Patch Set 2:\n\nStarted build for patchset #2 on: https://buildkite.com/tvl/depot/builds/24464","accounts_in_message":[],"_revision_number":2},{"id":"faf96268d6751a4141f4d64b267d6f57ac101b6c","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-18 15:38:42.000000000","message":"Patch Set 2: Verified+1\n\nBuild of patchset 2 passed: https://buildkite.com/tvl/depot/builds/24464","accounts_in_message":[],"_revision_number":2},{"id":"5f18edc3bc6e2459082267296178c668299b8268","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2023-05-18 16:10:33.000000000","message":"Uploaded patch set 3.\n\nCopied Votes:\n* Autosubmit+1 (copy condition: \"changekind:NO_CHANGE OR is:ANY\")\n\nOutdated Votes:\n* Verified+1 (copy condition: \"(is:ANY AND changekind:NO_CODE_CHANGE) OR changekind:NO_CHANGE\")\n","accounts_in_message":[],"_revision_number":3},{"id":"29db5afd3246088cd622eabc3ba61f7740e947c8","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-18 16:10:35.000000000","message":"Patch Set 3:\n\nStarted build for patchset #3 on: https://buildkite.com/tvl/depot/builds/24471","accounts_in_message":[],"_revision_number":3},{"id":"58fbd4417d8cf5fbf5577827a900a0cafc4fba83","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2023-05-18 16:12:23.000000000","message":"Patch Set 3: Code-Review+2\n\nBy voting Code-Review+2 the following files are now explicitly code-owner approved by \u003cGERRIT_ACCOUNT_1000034\u003e:\n* third_party/lisp/mime4cl/mime.lisp\n* third_party/lisp/mime4cl/streams.lisp\n* users/sterni/mblog/note.lisp\n","accounts_in_message":[{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}],"_revision_number":3},{"id":"f6618d080e47e4800ebd8f6b7b902e9eedd7fed2","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-05-18 16:14:36.000000000","message":"Patch Set 3: Verified+1\n\nBuild of patchset 3 passed: https://buildkite.com/tvl/depot/builds/24471","accounts_in_message":[],"_revision_number":3},{"id":"c5a3a773cd1d86bd989d620907c4abed983cef00","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},"date":"2023-05-18 16:14:38.000000000","message":"Change has been successfully rebased and submitted as 3d2e55ad535371d1152a221dc31a8773b3a09ddf","accounts_in_message":[],"_revision_number":4}],"current_revision_number":4,"current_revision":"3d2e55ad535371d1152a221dc31a8773b3a09ddf","revisions":{"a9d701d2bdbd28a068cf71eaadafd6f098a34351":{"kind":"REWORK","_number":1,"created":"2023-05-17 22:25:16.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/81/8581/1","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/81/8581/1","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/81/8581/1"}}},"commit":{"parents":[{"commit":"0ff2cf9eb5a1930820e56d24b9b7325af4032bdb","subject":"refactor(3p/lisp/mime4cl): use flexi-streams and binary input","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d0ff2cf9eb5a1930820e56d24b9b7325af4032bdb"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-15 21:36:40.000000000","tz":120},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-17 22:25:13.000000000","tz":120},"subject":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams","message":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams\n\nThe input adapter streams were input streams yielding either binary or\ncharacter data that could be constructed from a variable data source.\nThe stream would take care not to destroy the underlying data\nsource (i.e. not close it if it was a stream), so similar to with\nFILE-PORTIONs, but simpler.\n\nUnfortunately, the implementation was quite inefficient: They are\nultimately defined in terms of a function that retrieves the next\ncharacter in the source. This only allows for an implementation of\nREAD-CHAR (and READ-BYTE). Thanks to cl/8559, READ-SEQUENCE can be used\non e.g. FILE-PORTION, but this was still negated by a input adapter\nbased on one—then, READ-SEQUENCE would need to fall back on READ-CHAR or\nREAD-BYTE again.\n\nLuckily, we can replace BINARY-INPUT-ADAPTER-STREAM and\nCHARACTER-INPUT-ADAPTER-STREAM with a much simpler abstraction: Instead\nof extra stream classes, we have a function, MAKE-INPUT-ADAPTER, which\nreturns an appropriate instance of FLEXI-STREAM based on a given source.\nThis way, the need for a distinction between binary and character input\nadapter is eliminated, since FLEXI-STREAMS supports both binary and\ncharacter reads (external format is not yet handled, though).\nConsequently, the :binary keyword argument to MIME-BODY-STREAM can be\ndropped.\n\nflexi-streams provides stream classes for everything except a stream\nthat doesn\u0027t close the underlying one. Since we have already implemented\nthis in POSITIONED-FLEXI-INPUT-STREAM, we can split this functionality\ninto a new superclass ADAPTER-FLEXI-INPUT-STREAM.\n\nChange-Id: Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003da9d701d2bdbd28a068cf71eaadafd6f098a34351"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003da9d701d2bdbd28a068cf71eaadafd6f098a34351"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"0ff2cf9eb5a1930820e56d24b9b7325af4032bdb","is_merged_in_target_branch":false,"change_id":"I2d48c769bb110ca0b7cf52441bd63c1e1c2ccd04","change_number":8559,"patch_set_number":3,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"cd84e88c0c591f89623301d7c4889c7357721999":{"kind":"REWORK","_number":2,"created":"2023-05-18 15:36:16.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/81/8581/2","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/81/8581/2","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/81/8581/2"}}},"commit":{"parents":[{"commit":"4909ed4acf8629878f3bfdf14c1cd95ec2c462c2","subject":"refactor(3p/lisp/mime4cl): use flexi-streams and binary input","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d4909ed4acf8629878f3bfdf14c1cd95ec2c462c2"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-15 21:36:40.000000000","tz":120},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-18 11:13:04.000000000","tz":120},"subject":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams","message":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams\n\nThe input adapter streams were input streams yielding either binary or\ncharacter data that could be constructed from a variable data source.\nThe stream would take care not to destroy the underlying data\nsource (i.e. not close it if it was a stream), so similar to with\nFILE-PORTIONs, but simpler.\n\nUnfortunately, the implementation was quite inefficient: They are\nultimately defined in terms of a function that retrieves the next\ncharacter in the source. This only allows for an implementation of\nREAD-CHAR (and READ-BYTE). Thanks to cl/8559, READ-SEQUENCE can be used\non e.g. FILE-PORTION, but this was still negated by a input adapter\nbased on one—then, READ-SEQUENCE would need to fall back on READ-CHAR or\nREAD-BYTE again.\n\nLuckily, we can replace BINARY-INPUT-ADAPTER-STREAM and\nCHARACTER-INPUT-ADAPTER-STREAM with a much simpler abstraction: Instead\nof extra stream classes, we have a function, MAKE-INPUT-ADAPTER, which\nreturns an appropriate instance of FLEXI-STREAM based on a given source.\nThis way, the need for a distinction between binary and character input\nadapter is eliminated, since FLEXI-STREAMS supports both binary and\ncharacter reads (external format is not yet handled, though).\nConsequently, the :binary keyword argument to MIME-BODY-STREAM can be\ndropped.\n\nflexi-streams provides stream classes for everything except a stream\nthat doesn\u0027t close the underlying one. Since we have already implemented\nthis in POSITIONED-FLEXI-INPUT-STREAM, we can split this functionality\ninto a new superclass ADAPTER-FLEXI-INPUT-STREAM.\n\nThis change also allows addressing the performance regression\nencountered in cl/8559: It seems that flexi-streams performs worse when\nwe are reading byte by byte or char by char. (After this change mblog is\nstill two times slower than on r/6150.) By eliminating the adapter\nstreams, we can start utilizing READ-SEQUENCE via decoding code that\nsupports it (i.e. qbase64) and bring performance on par with r/6150\nagain. Surely there are also ways to gain back even more performance\nwhich has to be determined using profiling. Buffering more aggressively\nseems like a sure bet, though.\n\nSwitching to flexi-streams still seems like a no-brainer, as it allows\nus to drop a lot of code that was quite hacky (e.g. DELIMITED-INPUT-\nSTREAM) and implements en/decoding handling we did not support before,\nbut would need for improved correctness.\n\nChange-Id: Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dcd84e88c0c591f89623301d7c4889c7357721999"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dcd84e88c0c591f89623301d7c4889c7357721999"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"4909ed4acf8629878f3bfdf14c1cd95ec2c462c2","is_merged_in_target_branch":false,"change_id":"I2d48c769bb110ca0b7cf52441bd63c1e1c2ccd04","change_number":8559,"patch_set_number":4,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"cd9a91ee2dc3d7c6808226eb89ccaf8a380b54bf":{"kind":"REWORK","_number":3,"created":"2023-05-18 16:10:33.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/81/8581/3","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/81/8581/3","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/81/8581/3"}}},"commit":{"parents":[{"commit":"4909ed4acf8629878f3bfdf14c1cd95ec2c462c2","subject":"refactor(3p/lisp/mime4cl): use flexi-streams and binary input","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d4909ed4acf8629878f3bfdf14c1cd95ec2c462c2"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-15 21:36:40.000000000","tz":120},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-18 16:10:28.000000000","tz":120},"subject":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams","message":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams\n\nThe input adapter streams were input streams yielding either binary or\ncharacter data that could be constructed from a variable data source.\nThe stream would take care not to destroy the underlying data\nsource (i.e. not close it if it was a stream), so similar to with\nFILE-PORTIONs, but simpler.\n\nUnfortunately, the implementation was quite inefficient: They are\nultimately defined in terms of a function that retrieves the next\ncharacter in the source. This only allows for an implementation of\nREAD-CHAR (and READ-BYTE). Thanks to cl/8559, READ-SEQUENCE can be used\non e.g. FILE-PORTION, but this was still negated by a input adapter\nbased on one—then, READ-SEQUENCE would need to fall back on READ-CHAR or\nREAD-BYTE again.\n\nLuckily, we can replace BINARY-INPUT-ADAPTER-STREAM and\nCHARACTER-INPUT-ADAPTER-STREAM with a much simpler abstraction: Instead\nof extra stream classes, we have a function, MAKE-INPUT-ADAPTER, which\nreturns an appropriate instance of FLEXI-STREAM based on a given source.\nThis way, the need for a distinction between binary and character input\nadapter is eliminated, since FLEXI-STREAMS supports both binary and\ncharacter reads (external format is not yet handled, though).\nConsequently, the :binary keyword argument to MIME-BODY-STREAM can be\ndropped.\n\nflexi-streams provides stream classes for everything except a stream\nthat doesn\u0027t close the underlying one. Since we have already implemented\nthis in POSITIONED-FLEXI-INPUT-STREAM, we can split this functionality\ninto a new superclass ADAPTER-FLEXI-INPUT-STREAM.\n\nThis change also allows addressing the performance regression\nencountered in cl/8559: It seems that flexi-streams performs worse when\nwe are reading byte by byte or char by char. (After this change mblog is\nstill two times slower than on r/6150.) By eliminating the adapter\nstreams, we can start utilizing READ-SEQUENCE via decoding code that\nsupports it (i.e. qbase64) and bring performance on par with r/6150\nagain. Surely there are also ways to gain back even more performance\nwhich has to be determined using profiling. Buffering more aggressively\nseems like a sure bet, though.\n\nSwitching to flexi-streams still seems like a no-brainer, as it allows\nus to drop a lot of code that was quite hacky (e.g. DELIMITED-INPUT-\nSTREAM) and implements en/decoding handling we did not support before,\nbut would need for improved correctness.\n\nChange-Id: Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dcd9a91ee2dc3d7c6808226eb89ccaf8a380b54bf"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dcd9a91ee2dc3d7c6808226eb89ccaf8a380b54bf"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"4909ed4acf8629878f3bfdf14c1cd95ec2c462c2","is_merged_in_target_branch":false,"change_id":"I2d48c769bb110ca0b7cf52441bd63c1e1c2ccd04","change_number":8559,"patch_set_number":4,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"3d2e55ad535371d1152a221dc31a8773b3a09ddf":{"kind":"NO_CODE_CHANGE","_number":4,"created":"2023-05-18 16:14:38.000000000","uploader":{"_account_id":1000015,"name":"clbot","email":"clbot@tvl.fyi","username":"clbot","tags":["SERVICE_USER"]},"ref":"refs/changes/81/8581/4","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/81/8581/4","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/81/8581/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/81/8581/4"}}},"commit":{"parents":[{"commit":"b379e44dfb871100546b3d60bd3c77fbeac61adc","subject":"refactor(3p/lisp/mime4cl): use flexi-streams and binary input","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003db379e44dfb871100546b3d60bd3c77fbeac61adc"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2023-05-15 21:36:40.000000000","tz":120},"committer":{"name":"clbot","email":"clbot@tvl.fyi","date":"2023-05-18 16:14:38.000000000","tz":0},"subject":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams","message":"refactor(mime4cl): replace *-input-adapter-stream with flexi-streams\n\nThe input adapter streams were input streams yielding either binary or\ncharacter data that could be constructed from a variable data source.\nThe stream would take care not to destroy the underlying data\nsource (i.e. not close it if it was a stream), so similar to with\nFILE-PORTIONs, but simpler.\n\nUnfortunately, the implementation was quite inefficient: They are\nultimately defined in terms of a function that retrieves the next\ncharacter in the source. This only allows for an implementation of\nREAD-CHAR (and READ-BYTE). Thanks to cl/8559, READ-SEQUENCE can be used\non e.g. FILE-PORTION, but this was still negated by a input adapter\nbased on one—then, READ-SEQUENCE would need to fall back on READ-CHAR or\nREAD-BYTE again.\n\nLuckily, we can replace BINARY-INPUT-ADAPTER-STREAM and\nCHARACTER-INPUT-ADAPTER-STREAM with a much simpler abstraction: Instead\nof extra stream classes, we have a function, MAKE-INPUT-ADAPTER, which\nreturns an appropriate instance of FLEXI-STREAM based on a given source.\nThis way, the need for a distinction between binary and character input\nadapter is eliminated, since FLEXI-STREAMS supports both binary and\ncharacter reads (external format is not yet handled, though).\nConsequently, the :binary keyword argument to MIME-BODY-STREAM can be\ndropped.\n\nflexi-streams provides stream classes for everything except a stream\nthat doesn\u0027t close the underlying one. Since we have already implemented\nthis in POSITIONED-FLEXI-INPUT-STREAM, we can split this functionality\ninto a new superclass ADAPTER-FLEXI-INPUT-STREAM.\n\nThis change also allows addressing the performance regression\nencountered in cl/8559: It seems that flexi-streams performs worse when\nwe are reading byte by byte or char by char. (After this change mblog is\nstill two times slower than on r/6150.) By eliminating the adapter\nstreams, we can start utilizing READ-SEQUENCE via decoding code that\nsupports it (i.e. qbase64) and bring performance on par with r/6150\nagain. Surely there are also ways to gain back even more performance\nwhich has to be determined using profiling. Buffering more aggressively\nseems like a sure bet, though.\n\nSwitching to flexi-streams still seems like a no-brainer, as it allows\nus to drop a lot of code that was quite hacky (e.g. DELIMITED-INPUT-\nSTREAM) and implements en/decoding handling we did not support before,\nbut would need for improved correctness.\n\nChange-Id: Ie2d1f4e42b47512a5660a1ccc0deeec2bff9788d\nReviewed-on: https://cl.tvl.fyi/c/depot/+/8581\nAutosubmit: sterni \u003csternenseemann@systemli.org\u003e\nReviewed-by: sterni \u003csternenseemann@systemli.org\u003e\nTested-by: BuildkiteCI\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d3d2e55ad535371d1152a221dc31a8773b3a09ddf"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d3d2e55ad535371d1152a221dc31a8773b3a09ddf"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"b379e44dfb871100546b3d60bd3c77fbeac61adc","is_merged_in_target_branch":true,"change_id":"I2d48c769bb110ca0b7cf52441bd63c1e1c2ccd04","change_number":8559,"patch_set_number":5,"change_status":"MERGED"}],"branch":"refs/heads/canon","description":"Rebase"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~PrologRule","status":"CLOSED","labels":[{"label":"Autosubmit","status":"MAY"},{"label":"Conformant-Commit-Message","status":"OK","applied_by":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}},{"label":"All-Comments-Resolved","status":"OK","applied_by":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}},{"label":"Verified","status":"OK","applied_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}}]},{"rule_name":"Code-Owners","status":"CLOSED"}],"submit_requirements":[{"name":"All-Comments-Resolved","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:All-Comments-Resolved\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:All-Comments-Resolved\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Code-Owners","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"rule:Code-Owners","fulfilled":true,"status":"PASS","passing_atoms":["Code-Owners"],"failing_atoms":[]}},{"name":"Conformant-Commit-Message","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Conformant-Commit-Message\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Conformant-Commit-Message\u003dgerrit~PrologRule"],"failing_atoms":[]}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dgerrit~PrologRule","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dgerrit~PrologRule"],"failing_atoms":[]}}]}
