Skip to content

Update npm package js-yaml to v4.3.1 [SECURITY] - #9175

Open
hash-dependencies[bot] wants to merge 1 commit into
mainfrom
deps/js/npm-js-yaml-vulnerability
Open

Update npm package js-yaml to v4.3.1 [SECURITY]#9175
hash-dependencies[bot] wants to merge 1 commit into
mainfrom
deps/js/npm-js-yaml-vulnerability

Conversation

@hash-dependencies

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
js-yaml 4.3.04.3.1 age confidence

JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported

GHSA-5p4m-2wfm-xmqj

More information

Details

Quadratic CPU consumption in !!omap resolution (js-yaml 3.x and 4.x)
Summary

resolveYamlOmap() enforces key uniqueness for !!omap sequences with a linear
scan (objectKeys.indexOf(...)) inside the per-element loop, making resolution
O(n²) in the number of entries. A modestly sized YAML document therefore
consumes disproportionate CPU inside yaml.load(), giving a denial of service
against any consumer that parses untrusted YAML.

!!omap is registered in the default schema
(lib/schema/default.jsrequire('../type/omap')), so a plain
yaml.load(untrustedInput) with no options is affected — no custom schema or
non-default configuration is required.

This is the same weakness as CVE-2026-59870 / GHSA-724g-mxrg-4qvm, which was
fixed in the 5.x line in 5.2.1. That fix was never backported: both currently
maintained legacy lines still carry the original implementation.

Affected versions
Line Latest tested Status
3.x 3.15.0 Affected — objectKeys.indexOf(pairKey) at lib/type/omap.js:29
4.x 4.3.0 Affected — objectKeys.indexOf(pairKey) at lib/type/omap.js:30
5.x 5.2.2 Not affected — fixed in 5.2.1 (uses a Set)

Both figures are the newest release of each line at the time of writing, so
this is not a "you are on an old version" issue.

Details

lib/type/omap.js (js-yaml 4.3.0):

if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey)
else return false

objectKeys grows by one element per entry, and Array.prototype.indexOf is a
linear scan, so resolving an n-entry !!omap performs roughly
1 + 2 + … + n comparisons — quadratic in n. The work happens synchronously
inside yaml.load(), blocking the event loop for its whole duration.

The 5.x line already solves exactly this by tracking seen keys in a Set
(src/tag/sequence/omap.ts):

if (carrier.seen.has(key)) return 'duplicate key in ordered map'
carrier.seen.add(key)
Proof of concept
// poc.js  —  node poc.js
const yaml = require('js-yaml');
const doc = n => '!!omap\n' + Array.from({length: n}, (_, i) => `- k${i}: ${i}`).join('\n') + '\n';

for (const n of [10000, 20000, 40000, 80000]) {
  const d = doc(n), t = Date.now();
  yaml.load(d);                      // default schema, no options
  console.log(`n=${n} bytes=${d.length} load=${Date.now() - t}ms`);
}
Measured (node v20.20.2, default heap, no flags)

js-yaml 4.3.0

n=10000  bytes=137787   load=54ms
n=20000  bytes=297787   load=169ms
n=40000  bytes=617787   load=646ms
n=80000  bytes=1257787  load=2607ms

js-yaml 3.15.0

n=10000  bytes=137787   load=53ms
n=20000  bytes=297787   load=166ms
n=40000  bytes=617787   load=641ms
n=80000  bytes=1257787  load=2567ms

Runtime grows by a factor of ~4 for each doubling of n, which is the
signature of O(n²) (linear growth would be ~2×).

Scaling further: a 2.48 MB document with 150,000 entries blocked
yaml.load() for 10.8 seconds.

Impact

Any service that parses attacker-influenced YAML with js-yaml 3.x or 4.x can be
stalled with a small input. Because the loop is synchronous, a single request
blocks the Node.js event loop and stalls every other request in the process —
so the amplification is per-process, not just per-request.

Suggested severity: consistent with CVE-2026-59870 (the same weakness in
5.x), i.e. Availability-only impact, network attack vector, no privileges or
user interaction required.

Suggested fix

Mirror the 5.x fix — replace the linear scan with a Set:

// lib/type/omap.js
const seen = new Set()
// ...
if (seen.has(pairKey)) return false
seen.add(pairKey)

This preserves the existing duplicate-key rejection semantics exactly while
making resolution O(n). A maxOmapLength-style cap would also work, but the
Set matches what 5.x already ships and requires no new option.

References
  • CVE-2026-59870 / GHSA-724g-mxrg-4qvm — same weakness in 5.0.0–5.2.0, fixed in 5.2.1
  • lib/type/omap.js (3.x, 4.x) — the affected resolver
  • lib/schema/default.js — registers !!omap in the default schema
Discovery

Found by an automated static-analysis and executed-proof-of-concept scanner run
against js-yaml 4.2.0, then manually verified against 3.15.0 and 4.3.0 by
executing the proof of concept above. All timings in this report were measured
on the current releases of each line, not on the version originally scanned.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

nodeca/js-yaml (js-yaml)

v4.3.1

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • "before 4am every weekday,every weekend"

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

@hash-dependencies
hash-dependencies Bot enabled auto-merge August 7, 2026 06:37
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Error Error Aug 7, 2026 6:38am
hashdotdesign-tokens Error Error Aug 7, 2026 6:38am
petrinaut Error Error Aug 7, 2026 6:38am

@hash-dependencies

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
error This project's package.json defines "packageManager": "yarn@4.16.0". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.

@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Patch-level dependency bump with no source changes; low integration risk aside from verifying lockfile/install consistency.

Overview
Bumps js-yaml from 4.3.0 to 4.3.1 across direct dependencies (@apps/hash-api, @local/repo-chores, @tests/hash-playwright) and the root resolutions entry for @redocly/openapi-core/js-yaml.

This is a dependency-only change (no application code). It addresses GHSA-5p4m-2wfm-xmqj (quadratic CPU use when resolving !!omap during yaml.load() on untrusted YAML).

Reviewed by Cursor Bugbot for commit 9d964dc. Bugbot is set up for automated code reviews on this repo. 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/apps > hash-api Affects the HASH API (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/tests > playwright New or updated Playwright tests area/apps labels Aug 7, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 9d964dc. Configure here.

"immer": "10.1.3",
"install": "0.13.0",
"js-yaml": "4.3.0",
"js-yaml": "4.3.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lockfile omits security bump

High Severity

package.json files now request js-yaml@4.3.1, but yarn.lock still pins js-yaml@4.3.0 for the workspace packages and the shared resolution. Under Yarn 4, installs either fail on the lockfile mismatch or keep the vulnerable 4.3.0 build, so the intended CVE fix does not land.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9d964dc. Configure here.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.57%. Comparing base (c072f0d) to head (9d964dc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9175   +/-   ##
=======================================
  Coverage   59.57%   59.57%           
=======================================
  Files        1413     1413           
  Lines      138053   138053           
  Branches     6510     6510           
=======================================
  Hits        82241    82241           
  Misses      54770    54770           
  Partials     1042     1042           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 3.27% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.25% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.21% <ø> (ø)
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 7.36% <ø> (ø)
rust.hash-graph-authorization 62.59% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 29.66% <ø> (ø)
rust.hash-graph-store 42.16% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 78.98% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.82% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@codspeed-hq

codspeed-hq Bot commented Aug 7, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 15.38%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 96 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
bit_matrix/dense/iter_row[64] 140.8 ns 170 ns -17.16%
bit_matrix/dense/iter_row[200] 185.8 ns 215 ns -13.57%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing deps/js/npm-js-yaml-vulnerability (9d964dc) with main (271284a)

Open in CodSpeed

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
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 $$28.3 \mathrm{ms} \pm 195 \mathrm{μs}\left({\color{gray}-1.030 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.70 \mathrm{ms} \pm 35.8 \mathrm{μs}\left({\color{gray}-2.342 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.7 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}-1.591 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.1 \mathrm{ms} \pm 374 \mathrm{μs}\left({\color{gray}-0.625 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.7 \mathrm{ms} \pm 160 \mathrm{μs}\left({\color{gray}-0.924 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.5 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}0.147 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.2 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}-1.296 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$4.28 \mathrm{ms} \pm 30.2 \mathrm{μs}\left({\color{gray}3.27 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.9 \mathrm{ms} \pm 105 \mathrm{μs}\left({\color{gray}-2.333 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.91 \mathrm{ms} \pm 27.8 \mathrm{μs}\left({\color{gray}1.10 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.14 \mathrm{ms} \pm 29.4 \mathrm{μs}\left({\color{gray}2.09 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.55 \mathrm{ms} \pm 23.7 \mathrm{μs}\left({\color{gray}3.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.44 \mathrm{ms} \pm 35.7 \mathrm{μs}\left({\color{gray}1.58 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.66 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-0.011 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.37 \mathrm{ms} \pm 33.2 \mathrm{μs}\left({\color{gray}2.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.61 \mathrm{ms} \pm 37.1 \mathrm{μs}\left({\color{gray}2.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.48 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-1.731 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.24 \mathrm{ms} \pm 31.8 \mathrm{μs}\left({\color{gray}0.886 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.67 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}-0.445 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.55 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-1.507 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.69 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}2.81 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.99 \mathrm{ms} \pm 30.0 \mathrm{μs}\left({\color{gray}3.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.71 \mathrm{ms} \pm 13.9 \mathrm{μs}\left({\color{gray}0.788 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.95 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}0.962 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.16 \mathrm{ms} \pm 23.8 \mathrm{μs}\left({\color{gray}1.33 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}1.59 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.10 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}3.59 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.58 \mathrm{ms} \pm 35.4 \mathrm{μs}\left({\color{gray}1.95 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}0.127 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.39 \mathrm{ms} \pm 28.5 \mathrm{μs}\left({\color{gray}2.73 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.43 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-1.017 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.03 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{gray}-0.448 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.43 \mathrm{ms} \pm 31.4 \mathrm{μs}\left({\color{gray}0.650 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$43.4 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}-2.267 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$34.3 \mathrm{ms} \pm 214 \mathrm{μs}\left({\color{gray}-2.306 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$37.3 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}-1.737 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$33.0 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{gray}-4.075 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$47.1 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{red}7.00 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$51.8 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{gray}-0.315 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$43.4 \mathrm{ms} \pm 264 \mathrm{μs}\left({\color{gray}3.48 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$96.1 \mathrm{ms} \pm 535 \mathrm{μs}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$36.4 \mathrm{ms} \pm 241 \mathrm{μs}\left({\color{gray}0.571 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$283 \mathrm{ms} \pm 988 \mathrm{μs}\left({\color{lightgreen}-8.621 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$11.7 \mathrm{ms} \pm 76.1 \mathrm{μs}\left({\color{gray}0.162 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$11.5 \mathrm{ms} \pm 69.8 \mathrm{μs}\left({\color{gray}-3.043 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$11.6 \mathrm{ms} \pm 64.7 \mathrm{μs}\left({\color{gray}0.144 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$11.7 \mathrm{ms} \pm 75.8 \mathrm{μs}\left({\color{gray}-0.437 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$11.2 \mathrm{ms} \pm 71.0 \mathrm{μs}\left({\color{gray}-4.090 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$11.1 \mathrm{ms} \pm 66.2 \mathrm{μs}\left({\color{gray}-4.000 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$11.4 \mathrm{ms} \pm 78.8 \mathrm{μs}\left({\color{gray}-2.159 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$12.0 \mathrm{ms} \pm 63.1 \mathrm{μs}\left({\color{gray}1.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$12.0 \mathrm{ms} \pm 74.6 \mathrm{μs}\left({\color{gray}-0.095 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.0 \mathrm{ms} \pm 83.8 \mathrm{μs}\left({\color{gray}-0.768 \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 $$12.1 \mathrm{ms} \pm 74.9 \mathrm{μs}\left({\color{gray}-0.175 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$12.4 \mathrm{ms} \pm 87.1 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.9 \mathrm{ms} \pm 78.9 \mathrm{μs}\left({\color{gray}-3.110 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$12.1 \mathrm{ms} \pm 79.9 \mathrm{μs}\left({\color{gray}-2.185 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$12.4 \mathrm{ms} \pm 65.5 \mathrm{μs}\left({\color{gray}1.31 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$12.2 \mathrm{ms} \pm 77.8 \mathrm{μs}\left({\color{gray}-0.865 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$12.0 \mathrm{ms} \pm 74.9 \mathrm{μs}\left({\color{gray}-3.679 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$12.0 \mathrm{ms} \pm 81.6 \mathrm{μs}\left({\color{gray}-2.330 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$12.5 \mathrm{ms} \pm 87.0 \mathrm{μs}\left({\color{gray}3.22 \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.80 \mathrm{ms} \pm 46.4 \mathrm{μs}\left({\color{gray}-4.855 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$63.5 \mathrm{ms} \pm 490 \mathrm{μs}\left({\color{gray}-3.387 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$116 \mathrm{ms} \pm 607 \mathrm{μs}\left({\color{gray}-1.597 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$71.3 \mathrm{ms} \pm 633 \mathrm{μs}\left({\color{gray}-0.588 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$81.5 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{gray}-0.729 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$89.8 \mathrm{ms} \pm 629 \mathrm{μs}\left({\color{gray}-2.510 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$95.3 \mathrm{ms} \pm 682 \mathrm{μs}\left({\color{gray}-2.731 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$46.4 \mathrm{ms} \pm 242 \mathrm{μs}\left({\color{gray}0.057 \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 $$76.1 \mathrm{ms} \pm 467 \mathrm{μs}\left({\color{gray}3.30 \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 $$51.9 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{gray}-1.943 \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 $$61.5 \mathrm{ms} \pm 417 \mathrm{μs}\left({\color{gray}1.07 \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 $$63.5 \mathrm{ms} \pm 342 \mathrm{μs}\left({\color{gray}0.329 \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 $$63.9 \mathrm{ms} \pm 471 \mathrm{μs}\left({\color{gray}1.52 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$129 \mathrm{ms} \pm 666 \mathrm{μs}\left({\color{red}10.1 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$139 \mathrm{ms} \pm 760 \mathrm{μs}\left({\color{red}6.90 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$20.5 \mathrm{ms} \pm 130 \mathrm{μs}\left({\color{lightgreen}-18.328 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$535 \mathrm{ms} \pm 1.52 \mathrm{ms}\left({\color{gray}1.17 \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* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests > playwright New or updated Playwright tests area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant