Skip to content

Conversation

@lunelson
Copy link
Contributor

@lunelson lunelson commented Dec 17, 2025

(WIP, not quite ready, just triggering AI reviews atm)

🌟 What is the purpose of this PR?

This PR restructures the HASH design system into a proper 3-package PandaCSS architecture, replacing the previous ad-hoc approach with one aligned to official Panda CSS documentation.

Background

The original goal was to emulate Park UI, the official component library from the Ark UI / Panda CSS maintainers. However, Park UI uses a shadcn-style registry approach where consumers copy component code into their projects rather than importing from a dependency. This pattern doesn't fit our use case of publishing reusable npm packages.

Instead, this PR implements the "External Package" pattern from Panda CSS docs—a 3-package solution optimized for library authors:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   ds-theme      │────▶│   ds-helpers    │────▶│  ds-components  │
│  (Panda Preset) │     │ (Styled System) │     │ (React + Ark UI)│
└─────────────────┘     └─────────────────┘     └─────────────────┘
        │                       │                       │
   Design tokens          css(), cva(),           Button, Checkbox,
   from Figma             tokens, jsx             Avatar, etc.

🔗 Related links

🚫 Blocked by

  • Resolution of @hashintel/refractive module (missing/not built) — causes TSC errors in components using refractive effects

🔍 What does this change?

Package Architecture

@hashintel/ds-theme — The Panda Preset

A pure PandaCSS preset that defines design tokens sourced from Figma variable exports:

  • New codegen scripts: generate-colors.ts and generate-tokens.ts transform Figma JSON into Panda token definitions
  • Dual exports:
    • Main export (.) — The preset for use in panda.config.ts
    • Theme export (./theme) — Raw color/token definitions for stories and helpers
  • Token structure following Panda/Tailwind conventions:
    • Colors: gray.10, blue.50, accent.60 (core palette) + semantic tokens like bg.accent.bold, text.primary, border.neutral
    • Spacing: "3" = 4px, "5" = 8px, etc. (DEFAULT scale is implicit)
    • Radii: md.4 = 8px, md.full = 9999px, plus sm/lg/full scales
    • Typography: text-sm, text-base, font weights as strings ("medium", "semibold")

@hashintel/ds-helpers — The Styled System Package

The single source of truth for Panda CSS utilities across all consuming packages:

  • Runs panda codegen using ds-theme preset
  • Exports styled-system/* modules: css, cva, tokens, jsx, patterns, types
  • Includes Ladle stories for visual documentation
  • New: Playwright snapshot testing for visual regression

@hashintel/ds-components — The Component Library

React components built with Ark UI (headless) + Panda CSS (styling):

  • Import path change: Components now import from local styled-system/* (generated via panda codegen with ds-theme preset) rather than @hashintel/ds-helpers/*
  • Uses importMap in panda config to ensure type consistency
  • Components: Avatar, Badge, Button, Checkbox, RadioGroup, SegmentedControl, Slider, Switch
  • Storybook for documentation and development

Token Name Migrations

All components updated to use new token naming conventions:

Old Token New Token
"default.3" "3"
"spacing.1" "2"
"border.neutral.default" "border.neutral"
"bg.accent.bold.default" "bg.accent.bold"
"surface.default" "surface"
"radius.4" "md.4"
"core.gray.20" "gray.20"
fontWeight: 500 fontWeight: "medium"

Build System Changes

  • Migrated ds-theme and ds-components to tsdown for faster builds
  • Updated ESLint config for styled-system import resolution
  • Added .gitignore / biome.jsonc entries for generated styled-system directories

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing
  • modifies an npm-publishable library and I have added a changeset file(s)
  • modifies a Cargo-publishable library and I have amended the version
  • modifies a Cargo-publishable library, but it is not yet ready to publish
  • modifies a block that will need publishing via GitHub action once merged
  • I am unsure / need advice

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change
  • are in a state where docs changes are not yet required but will be
  • require changes to docs which are made as part of this PR
  • require changes to docs which are not made in this PR
  • I am unsure / need advice

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph
  • affected the execution graph, and the turbo.json's have been updated to reflect this
  • I am unsure / need advice

⚠️ Known issues

  1. @hashintel/refractive module not found — Components using refractive glass effects (SegmentedControl, Slider, Switch, Playground) fail TSC until this package is built/available
  2. exactOptionalPropertyTypes errors — Some Ark UI component props and Storybook args have type mismatches with strict optional property checking (pre-existing, not introduced by this PR)

🐾 Next steps

  1. Build/publish @hashintel/refractive to resolve remaining TSC errors
  2. Fix exactOptionalPropertyTypes issues in component stories and Ark UI prop spreading
  3. Apply same token migrations to @hashintel/petrinaut (partially complete in this PR)
  4. Add more Playwright snapshot tests for component states
  5. Consider publishing ds-theme and ds-helpers to npm for external consumption

🛡 What tests cover this?

  • Playwright snapshot tests in ds-helpers — Visual regression testing for color/token stories
  • TypeScript compilationyarn lint:tsc in each package validates token name correctness
  • Storybook build — Validates components render correctly with new token structure

❓ How to test this?

  1. Checkout the branch
  2. Run yarn install at repo root
  3. Build the design system packages:
    cd libs/@hashintel/ds-theme && yarn build
    cd libs/@hashintel/ds-helpers && yarn build
    cd libs/@hashintel/ds-components && yarn codegen && yarn build
  4. Run type checking:
    cd libs/@hashintel/ds-components && yarn lint:tsc
  5. Launch Storybook to verify components:
    cd libs/@hashintel/ds-components && yarn storybook
  6. Run snapshot tests:
    cd libs/@hashintel/ds-helpers && yarn test

📹 Demo

CleanShot 2026-01-15 at 12 00 09@2x CleanShot 2026-01-15 at 12 00 05@2x CleanShot 2026-01-15 at 11 59 45@2x CleanShot 2026-01-15 at 11 59 50@2x CleanShot 2026-01-15 at 12 00 25@2x CleanShot 2026-01-15 at 12 00 28@2x CleanShot 2026-01-15 at 12 00 55@2x CleanShot 2026-01-15 at 12 00 57@2x CleanShot 2026-01-15 at 12 01 07@2x CleanShot 2026-01-15 at 12 01 14@2x CleanShot 2026-01-15 at 12 01 26@2x CleanShot 2026-01-15 at 12 01 28@2x

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps area/apps > hash.design Affects the `hash.design` design site (app) labels Dec 17, 2025
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.38%. Comparing base (86f263f) to head (ca7f1e2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8191       +/-   ##
===========================================
+ Coverage   59.26%   70.38%   +11.12%     
===========================================
  Files        1191      344      -847     
  Lines      113436    27726    -85710     
  Branches     4982     1407     -3575     
===========================================
- Hits        67232    19516    -47716     
+ Misses      45428     7960    -37468     
+ Partials      776      250      -526     
Flag Coverage Δ
apps.hash-ai-worker-py ?
apps.hash-ai-worker-ts ?
apps.hash-api 0.00% <ø> (ø)
backend-integration-tests ?
blockprotocol.type-system ?
deer ?
error-stack ?
local.claude-hooks ?
local.harpc-client ?
local.hash-backend-utils ?
local.hash-graph-sdk 10.88% <ø> (ø)
local.hash-isomorphic-utils ?
local.hash-subgraph ?
rust.antsi ?
rust.deer ?
rust.error-stack ?
rust.harpc-codec ?
rust.harpc-net ?
rust.harpc-tower 66.80% <ø> (ø)
rust.harpc-types ?
rust.harpc-wire-protocol ?
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api ?
rust.hash-graph-authorization ?
rust.hash-graph-postgres-store ?
rust.hash-graph-store ?
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types ?
rust.hash-graph-validation ?
rust.hashql-ast 87.25% <ø> (ø)
rust.hashql-compiletest ?
rust.hashql-core ?
rust.hashql-diagnostics ?
rust.hashql-eval 68.54% <ø> (ø)
rust.hashql-hir 89.10% <ø> (ø)
rust.hashql-mir 88.29% <ø> (ø)
rust.hashql-syntax-jexpr ?
rust.sarif ?
sarif ?
tests.hash-backend-integration ?
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lunelson lunelson force-pushed the ln/h-5721-figma-vars-to-parkui-style-preset branch from cb07de7 to 929324c Compare December 19, 2025 13:17
@github-actions github-actions bot removed area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) area/apps labels Dec 19, 2025
@lunelson lunelson force-pushed the ln/h-5721-figma-vars-to-parkui-style-preset branch from 929324c to 877fefb Compare January 12, 2026 13:03
@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Jan 12, 2026
@lunelson lunelson force-pushed the ln/h-5721-figma-vars-to-parkui-style-preset branch from c4f07cc to 67f000c Compare January 12, 2026 15:09
@github-actions
Copy link
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.3 \mathrm{ms} \pm 150 \mathrm{μs}\left({\color{gray}-1.602 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 15.1 \mathrm{μs}\left({\color{gray}1.97 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.3 \mathrm{ms} \pm 84.0 \mathrm{μs}\left({\color{gray}-0.810 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.1 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}-1.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.8 \mathrm{ms} \pm 122 \mathrm{μs}\left({\color{gray}3.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.5 \mathrm{ms} \pm 146 \mathrm{μs}\left({\color{gray}-2.101 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$36.9 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{lightgreen}-14.352 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$5.19 \mathrm{ms} \pm 40.8 \mathrm{μs}\left({\color{lightgreen}-74.595 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$18.6 \mathrm{ms} \pm 130 \mathrm{μs}\left({\color{lightgreen}-34.719 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.64 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}-1.183 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}-2.608 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.14 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-3.151 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.06 \mathrm{ms} \pm 37.7 \mathrm{μs}\left({\color{gray}-0.054 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.36 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{gray}-2.984 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.93 \mathrm{ms} \pm 20.7 \mathrm{μs}\left({\color{gray}-2.168 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.18 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-0.979 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.25 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{gray}-2.684 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.80 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{lightgreen}-5.028 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.55 \mathrm{ms} \pm 9.66 \mathrm{μs}\left({\color{red}6.58 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.49 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{red}5.83 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.59 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{red}6.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.81 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{red}7.38 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.69 \mathrm{ms} \pm 10.8 \mathrm{μs}\left({\color{red}7.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.87 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{red}6.30 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.91 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}3.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.62 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{red}6.08 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.76 \mathrm{ms} \pm 10.9 \mathrm{μs}\left({\color{red}5.04 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.25 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}4.19 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.86 \mathrm{ms} \pm 25.2 \mathrm{μs}\left({\color{red}5.22 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.02 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}1.72 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.14 \mathrm{ms} \pm 14.1 \mathrm{μs}\left({\color{gray}3.32 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.79 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{red}5.52 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.04 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{red}5.55 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$38.7 \mathrm{ms} \pm 170 \mathrm{μs}\left({\color{gray}-1.795 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$75.7 \mathrm{ms} \pm 351 \mathrm{μs}\left({\color{gray}0.509 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$43.6 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}3.39 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.6 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}-0.163 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$54.1 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}2.54 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$40.8 \mathrm{ms} \pm 145 \mathrm{μs}\left({\color{gray}0.973 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$415 \mathrm{ms} \pm 822 \mathrm{μs}\left({\color{gray}0.496 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$95.0 \mathrm{ms} \pm 376 \mathrm{μs}\left({\color{gray}0.036 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.0 \mathrm{ms} \pm 367 \mathrm{μs}\left({\color{gray}0.872 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$278 \mathrm{ms} \pm 676 \mathrm{μs}\left({\color{gray}-1.673 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.5 \mathrm{ms} \pm 61.9 \mathrm{μs}\left({\color{gray}-2.215 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$15.0 \mathrm{ms} \pm 90.1 \mathrm{μs}\left({\color{gray}1.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.3 \mathrm{ms} \pm 71.2 \mathrm{μs}\left({\color{gray}-0.858 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$15.1 \mathrm{ms} \pm 73.5 \mathrm{μs}\left({\color{gray}4.40 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.0 \mathrm{ms} \pm 79.3 \mathrm{μs}\left({\color{gray}-2.531 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.9 \mathrm{ms} \pm 69.2 \mathrm{μs}\left({\color{gray}-0.453 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.8 \mathrm{ms} \pm 73.3 \mathrm{μs}\left({\color{gray}-1.891 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.5 \mathrm{ms} \pm 55.5 \mathrm{μs}\left({\color{gray}-3.324 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.3 \mathrm{ms} \pm 67.0 \mathrm{μs}\left({\color{gray}-1.717 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.4 \mathrm{ms} \pm 147 \mathrm{μs}\left({\color{gray}-2.076 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$30.2 \mathrm{ms} \pm 278 \mathrm{μs}\left({\color{gray}-0.235 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.0 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-1.199 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.7 \mathrm{ms} \pm 296 \mathrm{μs}\left({\color{gray}-1.354 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$29.5 \mathrm{ms} \pm 264 \mathrm{μs}\left({\color{gray}-4.697 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.5 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{gray}-1.804 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.6 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}-1.720 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$29.5 \mathrm{ms} \pm 263 \mathrm{μs}\left({\color{gray}-4.835 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$29.6 \mathrm{ms} \pm 330 \mathrm{μs}\left({\color{gray}-4.084 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$31.4 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}0.760 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.01 \mathrm{ms} \pm 30.5 \mathrm{μs}\left({\color{gray}1.24 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$47.1 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{gray}0.297 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$93.4 \mathrm{ms} \pm 392 \mathrm{μs}\left({\color{gray}0.451 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$52.8 \mathrm{ms} \pm 270 \mathrm{μs}\left({\color{gray}0.030 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$60.7 \mathrm{ms} \pm 384 \mathrm{μs}\left({\color{gray}0.939 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$69.1 \mathrm{ms} \pm 418 \mathrm{μs}\left({\color{gray}1.52 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$75.2 \mathrm{ms} \pm 376 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$50.9 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$80.4 \mathrm{ms} \pm 322 \mathrm{μs}\left({\color{gray}4.31 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$57.5 \mathrm{ms} \pm 250 \mathrm{μs}\left({\color{gray}-0.376 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$65.4 \mathrm{ms} \pm 358 \mathrm{μs}\left({\color{gray}0.787 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$68.8 \mathrm{ms} \pm 314 \mathrm{μs}\left({\color{gray}3.23 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$70.2 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}3.68 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$139 \mathrm{ms} \pm 618 \mathrm{μs}\left({\color{gray}4.10 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$135 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{gray}-0.260 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$39.8 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{lightgreen}-61.619 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$573 \mathrm{ms} \pm 1.17 \mathrm{ms}\left({\color{lightgreen}-6.391 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants