)]}'
{"id":"depot~8017","triplet_id":"depot~canon~I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0","project":"depot","branch":"canon","attention_set":{},"removed_from_attention_set":{"1000034":{"account":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"last_update":"2023-02-02 17:50:44.000000000","reason":"Change was submitted"},"1000001":{"account":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"last_update":"2023-02-02 17:50:44.000000000","reason":"Change was submitted"},"1000005":{"account":{"_account_id":1000005,"name":"edef","email":"edef@edef.eu","username":"edef"},"last_update":"2023-02-02 17:50:44.000000000","reason":"Change was submitted"},"1000036":{"account":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"last_update":"2023-02-02 16:28:06.000000000","reason":"removed on reply"},"1000010":{"account":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"last_update":"2023-02-02 17:50:44.000000000","reason":"Change was submitted"}},"hashtags":[],"change_id":"I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0","subject":"refactor(tvix/cli): use Wu-Manber string scanning for drv references","status":"MERGED","created":"2023-02-02 12:59:59.000000000","updated":"2023-02-02 17:50:44.000000000","submitted":"2023-02-02 17:50:44.000000000","submitter":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"8015","meta_rev_id":"d5ebe8f12dbeeb738869aef5092146c1080f1398","_number":8017,"virtual_id_number":8017,"owner":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"actions":{},"labels":{"Code-Review":{"approved":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"all":[{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"tag":"autogenerated:gerrit:merged","value":2,"date":"2023-02-02 17:50:44.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"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":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"tag":"autogenerated:gerrit:merged","value":1,"date":"2023-02-02 17:50:44.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":{"all":[{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"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":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"all":[{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]},"Conformant-Commit-Message":{"approved":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"all":[{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]}},"removable_reviewers":[{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"_account_id":1000005,"name":"edef","email":"edef@edef.eu","username":"edef"},{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"}],"reviewers":{"REVIEWER":[{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"_account_id":1000005,"name":"edef","email":"edef@edef.eu","username":"edef"},{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2023-02-02 13:00:03.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-02-02 13:03:15.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-02-02 16:06:52.000000000","updated_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"reviewer":{"_account_id":1000005,"name":"edef","email":"edef@edef.eu","username":"edef"},"state":"REVIEWER"},{"updated":"2023-02-02 16:06:52.000000000","updated_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"reviewer":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"state":"REVIEWER"},{"updated":"2023-02-02 16:06:52.000000000","updated_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"reviewer":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"state":"REVIEWER"},{"updated":"2023-02-02 16:06:52.000000000","updated_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"reviewer":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"state":"REVIEWER"}],"messages":[{"id":"7a204eb622f0f40a10c936ff45c516c89cf8e360","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-02-02 12:59:59.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"50d075c62472df75f0c67be2f374b963c6aff022","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 13:00:03.000000000","message":"Patch Set 1:\n\nStarted build for patchset #1 on: https://buildkite.com/tvl/depot/builds/22149","accounts_in_message":[],"_revision_number":1},{"id":"66fd1064873e724746ae80eef85269888114da71","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 13:03:15.000000000","message":"Patch Set 1: Verified+1\n\nBuild of patchset 1 passed: https://buildkite.com/tvl/depot/builds/22149","accounts_in_message":[],"_revision_number":1},{"id":"50ab4a90bdaff392a02c20f4a88caefd1c14336b","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-02-02 14:21:58.000000000","message":"Uploaded patch set 2: Patch Set 1 was rebased.\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":"a67d1e9ccdd7a8aa09403ebe8177a6b3200a857d","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 14:22:01.000000000","message":"Patch Set 2:\n\nStarted build for patchset #2 on: https://buildkite.com/tvl/depot/builds/22152","accounts_in_message":[],"_revision_number":2},{"id":"38df56c3afff941c8fc09b4480d69fef34871e71","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 14:24:04.000000000","message":"Patch Set 2: Verified+1\n\nBuild of patchset 2 passed: https://buildkite.com/tvl/depot/builds/22152","accounts_in_message":[],"_revision_number":2},{"id":"580f67144d66da06c59188bf1ee1400fcb497cdf","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-02-02 14:44:02.000000000","message":"Uploaded patch set 3: Patch Set 2 was rebased.\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":"ecfc1cc83d26770a61ca5a729085b4602d84e823","tag":"autogenerated:buildkite~trigger","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 14:44:05.000000000","message":"Patch Set 3:\n\nStarted build for patchset #3 on: https://buildkite.com/tvl/depot/builds/22158","accounts_in_message":[],"_revision_number":3},{"id":"669a40557289eebd77bcb7c400cc801384388e2c","tag":"autogenerated:buildkite~result","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2023-02-02 14:46:14.000000000","message":"Patch Set 3: Verified+1\n\nBuild of patchset 3 passed: https://buildkite.com/tvl/depot/builds/22158","accounts_in_message":[],"_revision_number":3},{"id":"f9ddcfb1f3d2bd687a247a57f38fe622f3dc4407","tag":"autogenerated:gerrit:code-owners:addReviewer","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-02-02 16:06:52.000000000","message":"\u003cGERRIT_ACCOUNT_1000036\u003e, who was added as reviewer owns the following files:\n* tvix/Cargo.lock\n* tvix/Cargo.nix\n* tvix/cli/Cargo.toml\n* tvix/cli/src/derivation.rs\n* tvix/cli/src/known_paths.rs\n* tvix/cli/src/refscan.rs\n* tvix/crate-hashes.json\n\n\u003cGERRIT_ACCOUNT_1000010\u003e, who was added as reviewer owns the following files:\n* tvix/Cargo.lock\n* tvix/Cargo.nix\n* tvix/cli/Cargo.toml\n* tvix/cli/src/derivation.rs\n* tvix/cli/src/known_paths.rs\n* tvix/cli/src/refscan.rs\n* tvix/crate-hashes.json\n\n\u003cGERRIT_ACCOUNT_1000034\u003e, who was added as reviewer owns the following files:\n* tvix/Cargo.lock\n* tvix/Cargo.nix\n* tvix/cli/Cargo.toml\n* tvix/cli/src/derivation.rs\n* tvix/cli/src/known_paths.rs\n* tvix/cli/src/refscan.rs\n* tvix/crate-hashes.json\n","accounts_in_message":[{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}],"_revision_number":3},{"id":"0e2d21e5ef8e201765367618db7851308b81ce43","author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"date":"2023-02-02 16:28:06.000000000","message":"Patch Set 3: Code-Review+2\n\nBy voting Code-Review+2 the following files are now code-owner approved by \u003cGERRIT_ACCOUNT_1000036\u003e:\n* tvix/Cargo.lock\n* tvix/Cargo.nix\n* tvix/cli/Cargo.toml\n* tvix/cli/src/derivation.rs\n* tvix/cli/src/known_paths.rs\n* tvix/cli/src/refscan.rs\n* tvix/crate-hashes.json\n","accounts_in_message":[{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"}],"_revision_number":3},{"id":"d5ebe8f12dbeeb738869aef5092146c1080f1398","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2023-02-02 17:50:44.000000000","message":"Change has been successfully rebased and submitted as 9d6f29a72b3b466dd697c2eaa97f9a41b767fdff","accounts_in_message":[],"_revision_number":4}],"current_revision_number":4,"current_revision":"9d6f29a72b3b466dd697c2eaa97f9a41b767fdff","revisions":{"ae61cb0a25c04d646b6a266270d8b64774ec51c9":{"kind":"REWORK","_number":1,"created":"2023-02-02 12:59:59.000000000","uploader":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"ref":"refs/changes/17/8017/1","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/17/8017/1","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/17/8017/1"}}},"commit":{"parents":[{"commit":"c3f5f886029109818cdc2caa76bad84c26991a37","subject":"fix(tvix/eval): unsafeDiscardStringContext is a no-op","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dc3f5f886029109818cdc2caa76bad84c26991a37"}]}],"author":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 12:51:59.000000000","tz":180},"committer":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 12:51:59.000000000","tz":180},"subject":"refactor(tvix/cli): use Wu-Manber string scanning for drv references","message":"refactor(tvix/cli): use Wu-Manber string scanning for drv references\n\nSwitch out the string-scanning algorithm used in the reference scanner.\n\nThe construction of aho-corasick automata made up the vast majority of\nruntime when evaluating nixpkgs previously. While the actual scanning\nwith a constructed automaton is relatively fast, we almost never scan\nfor the same set of strings twice and the cost is not worth it.\n\nAn algorithm that better matches our needs is the Wu-Manber multiple\nstring match algorithm, which works efficiently on *long* and *random*\nstrings of the *same length*, which describes store paths (up to their\nhash component).\n\nThis switches the refscanner crate to a Rust implementation[0][1] of\nthis algorithm.\n\nThis has several implications:\n\n1. This crate does not provide a way to scan streams. I\u0027m not sure if\n   this is an inherent problem with the algorithm (probably not, but\n   it would need buffering). Either way, related functions and\n   tests (which were actually unused) have been removed.\n\n2. All strings need to be of the same length. For this reason, we\n   truncate the known paths after their hash part (they are still\n   unique, of course).\n\n3. Passing an empty set of matches, or a match that is shorter than\n   the length of a store path, causes the crate to panic. We safeguard\n   against this by completely skipping the refscanning if there are no\n   known paths (i.e. when evaluating the first derivation of an eval),\n   and by bailing out of scanning a string that is shorter than a\n   store path.\n\nOn the upside, this reduces overall runtime to less 1/5 of what it was\nbefore when evaluating `pkgs.stdenv.drvPath`.\n\n[0]: Frankly, it\u0027s a random, research-grade MIT-licensed\n     crate that I found on Github:\n\n     https://github.com/jneem/wu-manber\n\n[1]: We probably want to rewrite or at least fork the above crate, and\n     add things like a three-byte wide scanner. Evaluating large\n     portions of nixpkgs can easily lead to more than 65k derivations\n     being scanned for.\n\nChange-Id: I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dae61cb0a25c04d646b6a266270d8b64774ec51c9"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dae61cb0a25c04d646b6a266270d8b64774ec51c9"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"c3f5f886029109818cdc2caa76bad84c26991a37","is_merged_in_target_branch":false,"change_id":"I4056d4c09f62d44d6bd52b791db03fe5556672b5","change_number":8016,"patch_set_number":1,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"809f7ef56b9524b79b002db3a0d05ec273af3f8b":{"kind":"TRIVIAL_REBASE","_number":2,"created":"2023-02-02 14:21:58.000000000","uploader":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"ref":"refs/changes/17/8017/2","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/17/8017/2","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/17/8017/2"}}},"commit":{"parents":[{"commit":"04f089ada44937f45dd1cbedbc4964db2459f95c","subject":"fix(tvix/eval): unsafeDiscardStringContext is a no-op","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d04f089ada44937f45dd1cbedbc4964db2459f95c"}]}],"author":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 12:51:59.000000000","tz":180},"committer":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 14:21:55.000000000","tz":180},"subject":"refactor(tvix/cli): use Wu-Manber string scanning for drv references","message":"refactor(tvix/cli): use Wu-Manber string scanning for drv references\n\nSwitch out the string-scanning algorithm used in the reference scanner.\n\nThe construction of aho-corasick automata made up the vast majority of\nruntime when evaluating nixpkgs previously. While the actual scanning\nwith a constructed automaton is relatively fast, we almost never scan\nfor the same set of strings twice and the cost is not worth it.\n\nAn algorithm that better matches our needs is the Wu-Manber multiple\nstring match algorithm, which works efficiently on *long* and *random*\nstrings of the *same length*, which describes store paths (up to their\nhash component).\n\nThis switches the refscanner crate to a Rust implementation[0][1] of\nthis algorithm.\n\nThis has several implications:\n\n1. This crate does not provide a way to scan streams. I\u0027m not sure if\n   this is an inherent problem with the algorithm (probably not, but\n   it would need buffering). Either way, related functions and\n   tests (which were actually unused) have been removed.\n\n2. All strings need to be of the same length. For this reason, we\n   truncate the known paths after their hash part (they are still\n   unique, of course).\n\n3. Passing an empty set of matches, or a match that is shorter than\n   the length of a store path, causes the crate to panic. We safeguard\n   against this by completely skipping the refscanning if there are no\n   known paths (i.e. when evaluating the first derivation of an eval),\n   and by bailing out of scanning a string that is shorter than a\n   store path.\n\nOn the upside, this reduces overall runtime to less 1/5 of what it was\nbefore when evaluating `pkgs.stdenv.drvPath`.\n\n[0]: Frankly, it\u0027s a random, research-grade MIT-licensed\n     crate that I found on Github:\n\n     https://github.com/jneem/wu-manber\n\n[1]: We probably want to rewrite or at least fork the above crate, and\n     add things like a three-byte wide scanner. Evaluating large\n     portions of nixpkgs can easily lead to more than 65k derivations\n     being scanned for.\n\nChange-Id: I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d809f7ef56b9524b79b002db3a0d05ec273af3f8b"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d809f7ef56b9524b79b002db3a0d05ec273af3f8b"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"04f089ada44937f45dd1cbedbc4964db2459f95c","is_merged_in_target_branch":false,"change_id":"I4056d4c09f62d44d6bd52b791db03fe5556672b5","change_number":8016,"patch_set_number":2,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"9b4612da30969191ec38d17cc6c35be75b6e95b3":{"kind":"TRIVIAL_REBASE","_number":3,"created":"2023-02-02 14:44:02.000000000","uploader":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"ref":"refs/changes/17/8017/3","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/17/8017/3","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/17/8017/3"}}},"commit":{"parents":[{"commit":"503e6810e739b288fbbc54d6f97d344311ff2c46","subject":"fix(tvix/eval): unsafeDiscardStringContext is a no-op","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d503e6810e739b288fbbc54d6f97d344311ff2c46"}]}],"author":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 12:51:59.000000000","tz":180},"committer":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 14:43:57.000000000","tz":180},"subject":"refactor(tvix/cli): use Wu-Manber string scanning for drv references","message":"refactor(tvix/cli): use Wu-Manber string scanning for drv references\n\nSwitch out the string-scanning algorithm used in the reference scanner.\n\nThe construction of aho-corasick automata made up the vast majority of\nruntime when evaluating nixpkgs previously. While the actual scanning\nwith a constructed automaton is relatively fast, we almost never scan\nfor the same set of strings twice and the cost is not worth it.\n\nAn algorithm that better matches our needs is the Wu-Manber multiple\nstring match algorithm, which works efficiently on *long* and *random*\nstrings of the *same length*, which describes store paths (up to their\nhash component).\n\nThis switches the refscanner crate to a Rust implementation[0][1] of\nthis algorithm.\n\nThis has several implications:\n\n1. This crate does not provide a way to scan streams. I\u0027m not sure if\n   this is an inherent problem with the algorithm (probably not, but\n   it would need buffering). Either way, related functions and\n   tests (which were actually unused) have been removed.\n\n2. All strings need to be of the same length. For this reason, we\n   truncate the known paths after their hash part (they are still\n   unique, of course).\n\n3. Passing an empty set of matches, or a match that is shorter than\n   the length of a store path, causes the crate to panic. We safeguard\n   against this by completely skipping the refscanning if there are no\n   known paths (i.e. when evaluating the first derivation of an eval),\n   and by bailing out of scanning a string that is shorter than a\n   store path.\n\nOn the upside, this reduces overall runtime to less 1/5 of what it was\nbefore when evaluating `pkgs.stdenv.drvPath`.\n\n[0]: Frankly, it\u0027s a random, research-grade MIT-licensed\n     crate that I found on Github:\n\n     https://github.com/jneem/wu-manber\n\n[1]: We probably want to rewrite or at least fork the above crate, and\n     add things like a three-byte wide scanner. Evaluating large\n     portions of nixpkgs can easily lead to more than 65k derivations\n     being scanned for.\n\nChange-Id: I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d9b4612da30969191ec38d17cc6c35be75b6e95b3"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d9b4612da30969191ec38d17cc6c35be75b6e95b3"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"503e6810e739b288fbbc54d6f97d344311ff2c46","is_merged_in_target_branch":true,"change_id":"I4056d4c09f62d44d6bd52b791db03fe5556672b5","change_number":8016,"patch_set_number":5,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"9d6f29a72b3b466dd697c2eaa97f9a41b767fdff":{"kind":"REWORK","_number":4,"created":"2023-02-02 17:50:44.000000000","uploader":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"ref":"refs/changes/17/8017/4","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/17/8017/4","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/17/8017/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/17/8017/4"}}},"commit":{"parents":[{"commit":"2c07ff0f8c126cb475c6e100b56bbaa03303dda7","subject":"docs(tvix): add more information to README","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d2c07ff0f8c126cb475c6e100b56bbaa03303dda7"}]}],"author":{"name":"Vincent Ambo","email":"mail@tazj.in","date":"2023-02-02 12:51:59.000000000","tz":180},"committer":{"name":"tazjin","email":"tazjin@tvl.su","date":"2023-02-02 17:50:44.000000000","tz":0},"subject":"refactor(tvix/cli): use Wu-Manber string scanning for drv references","message":"refactor(tvix/cli): use Wu-Manber string scanning for drv references\n\nSwitch out the string-scanning algorithm used in the reference scanner.\n\nThe construction of aho-corasick automata made up the vast majority of\nruntime when evaluating nixpkgs previously. While the actual scanning\nwith a constructed automaton is relatively fast, we almost never scan\nfor the same set of strings twice and the cost is not worth it.\n\nAn algorithm that better matches our needs is the Wu-Manber multiple\nstring match algorithm, which works efficiently on *long* and *random*\nstrings of the *same length*, which describes store paths (up to their\nhash component).\n\nThis switches the refscanner crate to a Rust implementation[0][1] of\nthis algorithm.\n\nThis has several implications:\n\n1. This crate does not provide a way to scan streams. I\u0027m not sure if\n   this is an inherent problem with the algorithm (probably not, but\n   it would need buffering). Either way, related functions and\n   tests (which were actually unused) have been removed.\n\n2. All strings need to be of the same length. For this reason, we\n   truncate the known paths after their hash part (they are still\n   unique, of course).\n\n3. Passing an empty set of matches, or a match that is shorter than\n   the length of a store path, causes the crate to panic. We safeguard\n   against this by completely skipping the refscanning if there are no\n   known paths (i.e. when evaluating the first derivation of an eval),\n   and by bailing out of scanning a string that is shorter than a\n   store path.\n\nOn the upside, this reduces overall runtime to less 1/5 of what it was\nbefore when evaluating `pkgs.stdenv.drvPath`.\n\n[0]: Frankly, it\u0027s a random, research-grade MIT-licensed\n     crate that I found on Github:\n\n     https://github.com/jneem/wu-manber\n\n[1]: We probably want to rewrite or at least fork the above crate, and\n     add things like a three-byte wide scanner. Evaluating large\n     portions of nixpkgs can easily lead to more than 65k derivations\n     being scanned for.\n\nChange-Id: I08926778e1e5d5a87fc9ac26e0437aed8bbd9eb0\nReviewed-on: https://cl.tvl.fyi/c/depot/+/8017\nTested-by: BuildkiteCI\nReviewed-by: flokli \u003cflokli@flokli.de\u003e\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d9d6f29a72b3b466dd697c2eaa97f9a41b767fdff"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d9d6f29a72b3b466dd697c2eaa97f9a41b767fdff"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"2c07ff0f8c126cb475c6e100b56bbaa03303dda7","is_merged_in_target_branch":true,"change_id":"I0f248cb060eccfe086468afed1d648652b35dfd1","change_number":8018,"patch_set_number":3,"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":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"}},{"label":"All-Comments-Resolved","status":"OK","applied_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"}},{"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":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"}}]},{"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":[]}}]}
