Skip to content

BE-427: Add hashql-macros crate with procedural macros for ID types and symbols#8495

Queued
indietyp wants to merge 15 commits intomainfrom
bm/be-427-hashql-derive-macro-for-enum-based-id-types
Queued

BE-427: Add hashql-macros crate with procedural macros for ID types and symbols#8495
indietyp wants to merge 15 commits intomainfrom
bm/be-427-hashql-derive-macro-for-enum-based-id-types

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

This PR introduces a new hashql-macros crate that provides procedural macros for generating ID types and symbol tables, replacing the existing declarative macro implementations. The new macros offer better error reporting, more flexible syntax, and improved maintainability.

🔗 Related links

  • Internal refactoring to improve macro ergonomics and error handling

🔍 What does this change?

  • Adds new hashql-macros crate with procedural macro implementations for define_id, id, and define_symbols
  • Replaces declarative newtype! macro with hashql_macros::define_id that supports both struct and enum ID types
  • Updates all ID type definitions to use the new macro syntax with #[id(...)] attributes
  • Migrates symbol table generation from declarative macro to define_symbols! procedural macro
  • Changes integer backing types from usize to u32 for most ID types to improve memory efficiency
  • Adds proper error reporting with span information for better developer experience
  • Introduces attribute-based configuration for ID types (e.g., derive(Step), display, crate)
  • Updates Cargo.lock to include new dependencies: unsynn, mutants, and proc-macro2/quote

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

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

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

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • Existing unit tests continue to pass with the new macro implementations
  • Compile-time assertions verify ID type roundtrip behavior
  • Integration tests ensure backward compatibility

❓ How to test this?

  1. Checkout the branch
  2. Run cargo build to verify all ID types compile correctly
  3. Run existing test suites to confirm functionality is preserved
  4. Try creating new ID types using the new syntax to verify macro functionality

@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Feb 28, 2026 2:08pm
petrinaut Ready Ready Preview Feb 28, 2026 2:08pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Preview Feb 28, 2026 2:08pm
hashdotdesign-tokens Ignored Ignored Preview Feb 28, 2026 2:08pm

@cursor
Copy link

cursor bot commented Feb 27, 2026

PR Summary

Medium Risk
Touches core hashql-core ID types and symbol generation across multiple crates, including changing many ID backings from usize to u32, which could surface overflow/size assumptions at runtime despite being mostly mechanical.

Overview
Introduces a new hashql-macros proc-macro crate providing define_id!/#[derive(Id)] for ID newtypes and define_symbols! for pre-interned symbol tables.

Migrates hashql-core from its declarative newtype!/symbols! macros to the new procedural macros, updating call sites to use #[id(...)] attributes (e.g. display, derive(Step), crate) and adjusting usages to prefer ::new/from_usize/EdgeId::MAX where appropriate.

Updates workspace dependencies (unsynn + transitive mutants) and refreshes generated dependency-diagram docs to include the new crate.

Written by Cursor Bugbot for commit b816f15. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/apps area/apps > hash-graph labels Feb 27, 2026
Copy link
Member Author

indietyp commented Feb 27, 2026

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@augmentcode
Copy link

augmentcode bot commented Feb 27, 2026

🤖 Augment PR Summary

Summary: This PR introduces a new hashql-macros proc-macro crate to generate HashQL ID types and symbol tables, replacing the previous declarative macro implementations.

Changes:

  • Added libs/@local/hashql/macros and wired it into the workspace and HashQL packages
  • Migrated ID type generation to procedural macros (define_id / #[id]) with attribute-based configuration and better diagnostics
  • Updated many ID types to use u32 backing storage (previously often usize) for memory efficiency
  • Reworked call sites to use from_usize conversions and ::new(...) constructors where needed
  • Replaced the declarative symbol-table macro with define_symbols! proc-macro generation
  • Updated dependency diagrams and package manifests to reflect the new crate

Technical Notes: The new macros support configurable crate paths, optional Step/Display generation, and provide span-aware errors for malformed macro input.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2026

Merging this PR will not alter performance

✅ 68 untouched benchmarks
🗄️ 12 archived benchmarks run1


Comparing bm/be-427-hashql-derive-macro-for-enum-based-id-types (b816f15) with main (ef314c5)2

Open in CodSpeed

Footnotes

  1. 12 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

  2. No successful run was found on main (e4abbb9) during the generation of this report, so ef314c5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 62.96296% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.04%. Comparing base (ef314c5) to head (b816f15).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...hql/mir/src/pass/analysis/data_dependency/graph.rs 50.00% 4 Missing ⚠️
...cal/hashql/core/src/graph/algorithms/tarjan/mod.rs 0.00% 3 Missing ⚠️
libs/@local/hashql/core/src/id/slice.rs 0.00% 2 Missing ⚠️
libs/@local/hashql/core/src/module/mod.rs 0.00% 2 Missing ⚠️
...hashql/core/src/graph/algorithms/dominators/mod.rs 0.00% 1 Missing ⚠️
...l/hashql/core/src/graph/algorithms/tarjan/tests.rs 0.00% 1 Missing ⚠️
libs/@local/hashql/core/src/graph/mod.rs 50.00% 1 Missing ⚠️
libs/@local/hashql/core/src/graph/tests.rs 83.33% 1 Missing ⚠️
libs/@local/hashql/core/src/id/bit_vec/finite.rs 0.00% 1 Missing ⚠️
.../@local/hashql/core/src/id/bit_vec/matrix/tests.rs 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8495      +/-   ##
==========================================
+ Coverage   63.03%   63.04%   +0.01%     
==========================================
  Files        1302     1308       +6     
  Lines      132960   132855     -105     
  Branches     5509     5509              
==========================================
- Hits        83808    83756      -52     
+ Misses      48238    48185      -53     
  Partials      914      914              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.hash-graph-sdk 7.73% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.harpc-net 96.14% <ø> (ø)
rust.harpc-tower 66.80% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.hash-graph-api 2.85% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hashql-ast 87.23% <ø> (-0.02%) ⬇️
rust.hashql-compiletest 29.69% <ø> (ø)
rust.hashql-core 82.29% <37.50%> (+0.02%) ⬆️
rust.hashql-eval 69.13% <ø> (ø)
rust.hashql-hir 89.06% <ø> (-0.05%) ⬇️
rust.hashql-mir 92.59% <83.33%> (+0.16%) ⬆️
rust.hashql-syntax-jexpr 94.05% <ø> (ø)

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.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Member

@TimDiekmann TimDiekmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing a LICENSE.md file

@indietyp indietyp requested a review from a team as a code owner February 28, 2026 14:01
@github-actions github-actions bot added area/infra Relates to version control, CI, CD or IaC (area) type/legal Owned by the @legal team labels Feb 28, 2026
@graphite-app graphite-app bot requested review from a team February 28, 2026 14:22
@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 $$29.1 \mathrm{ms} \pm 198 \mathrm{μs}\left({\color{gray}2.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.65 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}1.11 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$14.0 \mathrm{ms} \pm 90.6 \mathrm{μs}\left({\color{gray}4.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$46.3 \mathrm{ms} \pm 354 \mathrm{μs}\left({\color{gray}2.00 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$16.2 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}0.334 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$26.3 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}0.824 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$30.2 \mathrm{ms} \pm 176 \mathrm{μs}\left({\color{gray}1.15 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$4.01 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}0.169 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$15.2 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}1.77 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$4.06 \mathrm{ms} \pm 26.2 \mathrm{μs}\left({\color{gray}-4.224 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.25 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-2.518 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.60 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{lightgreen}-5.056 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.56 \mathrm{ms} \pm 30.0 \mathrm{μs}\left({\color{gray}-2.233 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.87 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-2.958 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.46 \mathrm{ms} \pm 28.1 \mathrm{μs}\left({\color{gray}-3.989 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.74 \mathrm{ms} \pm 27.9 \mathrm{μs}\left({\color{gray}-3.493 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.67 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-4.374 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.41 \mathrm{ms} \pm 20.9 \mathrm{μs}\left({\color{gray}-4.904 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.93 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}-2.873 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.88 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}-3.983 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.98 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{lightgreen}-6.703 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.30 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-4.421 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.09 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-2.758 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.43 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-3.206 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.30 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}-0.648 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-1.022 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.14 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-2.514 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.74 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}-1.531 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.36 \mathrm{ms} \pm 19.5 \mathrm{μs}\left({\color{lightgreen}-5.106 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.54 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}-4.923 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.71 \mathrm{ms} \pm 21.6 \mathrm{μs}\left({\color{gray}-3.274 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.31 \mathrm{ms} \pm 20.7 \mathrm{μs}\left({\color{gray}-3.576 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.64 \mathrm{ms} \pm 21.6 \mathrm{μs}\left({\color{gray}-2.188 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$44.3 \mathrm{ms} \pm 227 \mathrm{μs}\left({\color{lightgreen}-5.681 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$82.3 \mathrm{ms} \pm 599 \mathrm{μs}\left({\color{gray}-4.465 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$48.1 \mathrm{ms} \pm 218 \mathrm{μs}\left({\color{lightgreen}-5.656 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$51.2 \mathrm{ms} \pm 372 \mathrm{μs}\left({\color{lightgreen}-5.770 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$59.5 \mathrm{ms} \pm 339 \mathrm{μs}\left({\color{gray}-4.808 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$45.9 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}-0.080 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$428 \mathrm{ms} \pm 1.25 \mathrm{ms}\left({\color{gray}-1.239 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$106 \mathrm{ms} \pm 632 \mathrm{μs}\left({\color{gray}2.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$91.6 \mathrm{ms} \pm 396 \mathrm{μs}\left({\color{gray}-1.592 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$301 \mathrm{ms} \pm 703 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$17.2 \mathrm{ms} \pm 84.2 \mathrm{μs}\left({\color{gray}0.359 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$18.0 \mathrm{ms} \pm 90.6 \mathrm{μs}\left({\color{red}7.92 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$17.1 \mathrm{ms} \pm 86.5 \mathrm{μs}\left({\color{gray}-0.137 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$17.7 \mathrm{ms} \pm 105 \mathrm{μs}\left({\color{gray}3.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$20.5 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}0.827 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$17.3 \mathrm{ms} \pm 91.2 \mathrm{μs}\left({\color{gray}0.450 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$17.1 \mathrm{ms} \pm 72.1 \mathrm{μs}\left({\color{gray}-1.631 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$17.4 \mathrm{ms} \pm 94.8 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$18.4 \mathrm{ms} \pm 96.3 \mathrm{μs}\left({\color{gray}2.53 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.0 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}-0.306 \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 $$32.5 \mathrm{ms} \pm 317 \mathrm{μs}\left({\color{gray}2.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$31.4 \mathrm{ms} \pm 316 \mathrm{μs}\left({\color{gray}-1.287 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$31.2 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{gray}-1.506 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$33.0 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{red}6.38 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$31.3 \mathrm{ms} \pm 253 \mathrm{μs}\left({\color{gray}-4.504 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$32.2 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}-0.023 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$31.6 \mathrm{ms} \pm 273 \mathrm{μs}\left({\color{gray}-0.230 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$32.9 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}-0.522 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$32.2 \mathrm{ms} \pm 344 \mathrm{μs}\left({\color{lightgreen}-5.442 \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 $$9.04 \mathrm{ms} \pm 43.1 \mathrm{μs}\left({\color{gray}1.27 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$96.1 \mathrm{ms} \pm 515 \mathrm{μs}\left({\color{gray}-0.193 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$149 \mathrm{ms} \pm 831 \mathrm{μs}\left({\color{gray}-0.318 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$104 \mathrm{ms} \pm 547 \mathrm{μs}\left({\color{gray}-0.438 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$113 \mathrm{ms} \pm 664 \mathrm{μs}\left({\color{gray}-0.332 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$120 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}-2.455 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$126 \mathrm{ms} \pm 581 \mathrm{μs}\left({\color{gray}-3.586 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$90.8 \mathrm{ms} \pm 585 \mathrm{μs}\left({\color{gray}-3.168 \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 $$120 \mathrm{ms} \pm 669 \mathrm{μs}\left({\color{gray}-2.406 \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 $$97.0 \mathrm{ms} \pm 702 \mathrm{μs}\left({\color{gray}-3.950 \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 $$106 \mathrm{ms} \pm 735 \mathrm{μs}\left({\color{gray}-3.908 \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 $$108 \mathrm{ms} \pm 748 \mathrm{μs}\left({\color{gray}-4.095 \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 $$109 \mathrm{ms} \pm 683 \mathrm{μs}\left({\color{gray}-3.110 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$138 \mathrm{ms} \pm 598 \mathrm{μs}\left({\color{gray}3.28 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$137 \mathrm{ms} \pm 563 \mathrm{μs}\left({\color{gray}2.52 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$109 \mathrm{ms} \pm 769 \mathrm{μs}\left({\color{lightgreen}-13.730 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$602 \mathrm{ms} \pm 3.96 \mathrm{ms}\left({\color{red}5.59 \mathrm{\%}}\right) $$ Flame Graph

@indietyp indietyp added this pull request to the merge queue Feb 28, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-graph area/apps 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) type/eng > backend Owned by the @backend team type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

3 participants