mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
perf(desktop): GUI performance sweep — async offload, poll reduction, render stabilization (#1641)
Signed-off-by: Tyler Longwell <tlongwell@block.xyz> Co-authored-by: npub17jjz49l9jjmhhk7cac63j8yt9z555n9cw8vk7v5jz4vzw4ppld5qgj57cc <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1cc3ha7z055mu0rwwu7806t2wt8mj3pvu0uv5mfp2c50dahaqhczshdalg6 <c6237ef84fa537c78dcee78efd2d4e59f728859c7f194da42ac51ededfa0be05@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1jmc9dt2lyvzu3h0kxlwxt5zg4fxp9476awyxw6gwxn72g6cw7exqs64whm <96f056ad5f2305c8ddf637dc65d048aa4c12d7daeb8867690e34fca46b0ef64c@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
co-authored by
npub17jjz49l9jjmhhk7cac63j8yt9z555n9cw8vk7v5jz4vzw4ppld5qgj57cc
Tyler Longwell
npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757
npub1cc3ha7z055mu0rwwu7806t2wt8mj3pvu0uv5mfp2c50dahaqhczshdalg6
npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf
npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr
npub1jmc9dt2lyvzu3h0kxlwxt5zg4fxp9476awyxw6gwxn72g6cw7exqs64whm
npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta
parent
11608ef675
commit
2cc0eb5396
@@ -0,0 +1,81 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { isRelayDependentQueryKey } from "./relayQueryInvalidation.ts";
|
||||
|
||||
test("relay invalidation includes relay-backed channel and profile queries", () => {
|
||||
for (const queryKey of [
|
||||
["channels"],
|
||||
["channels", "channel-1", "members"],
|
||||
["channel-messages", "channel-1"],
|
||||
["thread-replies", "channel-1", "root-1"],
|
||||
["forum-posts", "channel-1"],
|
||||
["home-feed"],
|
||||
["users-batch", "alice"],
|
||||
["presence", "alice"],
|
||||
["user-status", "alice"],
|
||||
["relay-agents"],
|
||||
["relayMembers"],
|
||||
["archivedIdentities"],
|
||||
["oaOwner", "alice"],
|
||||
]) {
|
||||
assert.equal(isRelayDependentQueryKey(queryKey), true, queryKey.join("/"));
|
||||
}
|
||||
});
|
||||
|
||||
test("relay invalidation includes social/workflow relay queries", () => {
|
||||
for (const queryKey of [
|
||||
["global-notes"],
|
||||
["liked-notes", "alice"],
|
||||
["pulse-reactions", "note-1"],
|
||||
["workflows", "channel-1"],
|
||||
["workflows-all", "channel-1"],
|
||||
["workflow-runs", "workflow-1"],
|
||||
["run-approvals", "workflow-1", "run-1"],
|
||||
["reminders", "alice"],
|
||||
["custom-emoji"],
|
||||
]) {
|
||||
assert.equal(isRelayDependentQueryKey(queryKey), true, queryKey.join("/"));
|
||||
}
|
||||
});
|
||||
|
||||
test("relay invalidation excludes local Tauri and disk-only query roots", () => {
|
||||
for (const queryKey of [
|
||||
["identity"],
|
||||
["managed-agents"],
|
||||
["personas"],
|
||||
["teams"],
|
||||
["acp-runtimes"],
|
||||
["backend-providers"],
|
||||
["managed-agent-log", "agent-1", 200],
|
||||
["workspace-icon", "wss://relay.example"],
|
||||
["agent-memory", "agent-1"],
|
||||
]) {
|
||||
assert.equal(isRelayDependentQueryKey(queryKey), false, queryKey.join("/"));
|
||||
}
|
||||
});
|
||||
|
||||
test("relay invalidation separates relay project queries from local repo work", () => {
|
||||
for (const queryKey of [
|
||||
["projects"],
|
||||
["project", "project-1"],
|
||||
["project", "project-1", "issues"],
|
||||
["project", "project-1", "pull-requests"],
|
||||
["projects", "issues", ["project-1"]],
|
||||
["projects", "activity-summaries", ["addr-1"]],
|
||||
]) {
|
||||
assert.equal(isRelayDependentQueryKey(queryKey), true, queryKey.join("/"));
|
||||
}
|
||||
|
||||
for (const queryKey of [
|
||||
["project", "project-1", "repo-state"],
|
||||
["project", "project-1", "repo-snapshot", "main"],
|
||||
["project", "project-1", "repo-diff", "main"],
|
||||
["project", "project-1", "local-repo-diff"],
|
||||
["project", "project-1", "commit-diff", "remote"],
|
||||
["projects", "local-repositories", "default"],
|
||||
["projects", "repo-snapshots", "default", ["project-1"]],
|
||||
]) {
|
||||
assert.equal(isRelayDependentQueryKey(queryKey), false, queryKey.join("/"));
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user