Skip to content

H-5655: Refactor selection logic and migrate to @xyflow/react v12#8523

Open
kube wants to merge 19 commits intomainfrom
cf/h-5655-refactor-selection-logic
Open

H-5655: Refactor selection logic and migrate to @xyflow/react v12#8523
kube wants to merge 19 commits intomainfrom
cf/h-5655-refactor-selection-logic

Conversation

@kube
Copy link
Collaborator

@kube kube commented Mar 7, 2026

🌟 What is the purpose of this PR?

Refactor the selection logic in Petrinaut and migrate to @xyflow/react v12. This centralizes selection state in EditorContext, adds multi-selection support, and improves keyboard shortcut handling.

🔗 Related links

🔍 What does this change?

  • Migrate to @xyflow/react v12 with updated APIs and types
  • Centralize selection state in EditorContext with isSelected/hasSelection helpers
  • Add multi-selection support — click nodes/arcs with modifier keys, with a new multi-selection panel in Properties
  • Add arc properties panel for viewing/editing selected arcs
  • Make Delete/Backspace work globally for all selected item types (places, transitions, arcs)
  • Batch multi-node drag position commits into single atomic mutations
  • Highlight selected nodes in MiniMap
  • Add partial selection setting in viewport settings dialog
  • Remove browser tests and related dependencies
  • Fix stale selection race conditions and restrict arc selection to click-only
  • Add selection cleanup hook to handle removed items

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 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

⚠️ Known issues

  • Selection synchronization between EditorContext and ReactFlow's internal state still needs enhancements
  • Selection logic is functional but not perfect — will need reworking later

🐾 Next steps

  • Comprehensive testing pass needed once dependent features are built
  • Further refinement of selection sync between EditorContext and ReactFlow
  • This provides a solid foundation to build on, but the selection system will need another iteration

🛡 What tests cover this?

  • No automated tests — browser tests were removed as part of this PR

❓ How to test this?

  1. Checkout the branch / view the deployment
  2. Open a Petri net in the editor
  3. Select nodes, transitions, and arcs — verify single and multi-selection works
  4. Use Delete/Backspace to remove selected items
  5. Drag multiple selected nodes and verify positions update atomically
  6. Check MiniMap highlights selected nodes

@vercel
Copy link

vercel bot commented Mar 7, 2026

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

Project Deployment Actions Updated (UTC)
hash Error Error Mar 11, 2026 9:48am
hashdotdesign Ready Ready Preview, Comment Mar 11, 2026 9:48am
hashdotdesign-tokens Ready Ready Preview, Comment Mar 11, 2026 9:48am
petrinaut Ready Ready Preview Mar 11, 2026 9:48am

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Mar 7, 2026
@kube kube changed the base branch from cf/h-6281-basic-undoredo-in-petrinaut-demo-app to graphite-base/8523 March 9, 2026 10:38
@kube kube force-pushed the graphite-base/8523 branch from 9b3ab34 to 5604e83 Compare March 9, 2026 12:48
@kube kube force-pushed the cf/h-5655-refactor-selection-logic branch from a4cb46c to 4043333 Compare March 9, 2026 12:48
@kube kube changed the base branch from graphite-base/8523 to cf/h-6281-basic-undoredo-in-petrinaut-demo-app March 9, 2026 12:48
@kube kube changed the base branch from cf/h-6281-basic-undoredo-in-petrinaut-demo-app to graphite-base/8523 March 9, 2026 17:44
@kube kube force-pushed the graphite-base/8523 branch from 5604e83 to 9f3aa5b Compare March 9, 2026 22:09
@kube kube force-pushed the cf/h-5655-refactor-selection-logic branch from 4043333 to 47518e4 Compare March 9, 2026 22:09
@kube kube changed the base branch from graphite-base/8523 to main March 9, 2026 22:09
@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Mar 9, 2026
@kube kube force-pushed the cf/h-5655-refactor-selection-logic branch from 47518e4 to 4a51729 Compare March 9, 2026 23:47
@github-actions github-actions bot removed the area/infra Relates to version control, CI, CD or IaC (area) label Mar 9, 2026
@kube kube marked this pull request as ready for review March 9, 2026 23:52
@cursor
Copy link

cursor bot commented Mar 9, 2026

PR Summary

Medium Risk
Touches core editor selection/deletion and ReactFlow integration, so regressions could affect basic canvas interactions (select/drag/delete) despite being mostly internal UI/state refactors.

Overview
Upgrades Petrinaut from reactflow to @xyflow/react v12 (deps, types, CSS import, and updated APIs like screenToFlowPosition, store lookups, and selection config).

Refactors selection into a typed SelectionMap in EditorContext with helpers (isSelected, hasSelection, toggle/add/remove), adds reactive selection cleanup on model mutation, and updates all panels/lists to support multi-select via ctrl/meta-click.

Adds new properties UI for arcs (ArcProperties) and for multi-selection summaries/actions, plus global Delete/Backspace handling via keyboard shortcuts; deletion now accepts the typed selection map and cascades correctly across places/transitions/arcs/types/equations/parameters.

Adjusts layout/drag position math to consistently treat SDCPN positions as center coordinates (dims-aware) and commits drag-end updates atomically; adds a user setting for partial box selection and highlights selected nodes in the minimap.

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

@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Mar 9, 2026
kube and others added 18 commits March 11, 2026 01:30
- Extract selection state into dedicated module with SelectionMap type
- Add arc selection and multi-selection support in properties panel
- Migrate from reactflow v11 to @xyflow/react v12
- Fix node centering by offsetting positions in mapper instead of CSS transforms
- Add measured dimensions to nodes to fix arc invisibility after large moves
- Add browser tests for SDCPNView with vitest-browser-playwright
- Update node dimensions to match actual visual sizes for classic/compact modes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tests

Remove dual selection management between onNodeClick/onEdgeClick and
ReactFlow's internal handleNodeClick. Selection now flows exclusively
through ReactFlow → onNodesChange → useApplyNodeChanges → setSelection,
fixing meta+click multi-select which was broken by conflicting handlers.

Fix multi-node drag position commit by reading change.position directly
from ReactFlow events instead of stale draggingStateByNodeId closure.

Add integration test file using real EditorProvider + controlled SDCPNContext
covering click selection, meta+click toggle, pane clear, single/multi-node
drag, and keyboard delete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation

Previously each dragged node's position was committed via a separate
mutatePetriNetDefinition call, causing a visual snap-back glitch when the
dragging state was cleared before all positions were flushed. Now all
position updates are applied in one mutatePetriNetDefinition call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…only

- setSelection now accepts a functional updater so concurrent
  onNodesChange/onEdgesChange calls chain against latest state instead
  of clobbering each other via stale closures.
- Arcs are excluded from drag-to-select; a dedicated onEdgeClick handler
  makes them selectable only by direct click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a `partialSelection` user setting (default true) that controls
whether drag-to-select picks up partially intersected nodes. Refactor
the viewport settings dialog to use a reusable SettingRow grid component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove FocusNodeRegistrar and all focusNode/registerFocusNode plumbing
from the editor context. Viewport centering on node selection will be
revisited as a dedicated feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Selected nodes render with a light blue fill and stroke in the MiniMap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move deletion keyboard handling from SDCPNView's onKeyDown to the global
keyboard shortcuts hook using useEffectEvent, so Delete/Backspace works
from anywhere in Petrinaut. Extend deleteItemsByIds to also handle types,
differential equations, and parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…temsByIds

Expose `isSelected(id)` and `hasSelection` from EditorContext so consumers
no longer need direct access to the SelectionMap for simple lookups. Change
`deleteItemsByIds` to accept typed SelectionMap, enabling it to partition
by item type and skip irrelevant collections. Migrate all 12 UI consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e test deps

- Convert ELK top-left positions to center coordinates in calculateGraphLayout,
  matching the convention used by useSdcpnToReactFlow and useApplyNodeChanges
- Accept dims parameter instead of using deprecated nodeDimensions alias, so
  layout uses correct dimensions for compact vs classic mode
- Fix selection guards to check base map instead of prevSelection, preventing
  previously-selected canvas nodes from being dropped during box-select when
  non-canvas items are selected
- Re-add @testing-library/dom and @testing-library/react devDependencies needed
  by unit tests that were incorrectly removed with browser test cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 $$27.5 \mathrm{ms} \pm 168 \mathrm{μs}\left({\color{gray}-0.454 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}-1.862 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.6 \mathrm{ms} \pm 90.9 \mathrm{μs}\left({\color{gray}1.83 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.3 \mathrm{ms} \pm 341 \mathrm{μs}\left({\color{gray}-1.986 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.1 \mathrm{ms} \pm 122 \mathrm{μs}\left({\color{gray}1.26 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.2 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}-3.129 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.3 \mathrm{ms} \pm 188 \mathrm{μs}\left({\color{gray}2.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.89 \mathrm{ms} \pm 25.3 \mathrm{μs}\left({\color{gray}0.324 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.6 \mathrm{ms} \pm 122 \mathrm{μs}\left({\color{red}8.52 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$4.01 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}2.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.16 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.49 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}0.545 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.39 \mathrm{ms} \pm 30.4 \mathrm{μs}\left({\color{gray}0.420 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.72 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}0.620 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.31 \mathrm{ms} \pm 26.6 \mathrm{μs}\left({\color{gray}0.436 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.63 \mathrm{ms} \pm 25.3 \mathrm{μs}\left({\color{gray}0.627 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 22.4 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.35 \mathrm{ms} \pm 37.5 \mathrm{μs}\left({\color{gray}2.88 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.85 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}0.634 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.83 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.93 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}1.25 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.19 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{gray}0.817 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}-1.167 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.29 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{gray}-0.175 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.21 \mathrm{ms} \pm 19.6 \mathrm{μs}\left({\color{gray}-0.331 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}1.94 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.08 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-0.543 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.65 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}0.153 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.18 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}-1.244 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.47 \mathrm{ms} \pm 24.4 \mathrm{μs}\left({\color{gray}0.727 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.59 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}-0.742 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.20 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}-0.764 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.47 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}-0.188 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$42.8 \mathrm{ms} \pm 212 \mathrm{μs}\left({\color{gray}1.92 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$81.4 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}2.72 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$47.5 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}0.107 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$49.8 \mathrm{ms} \pm 384 \mathrm{μs}\left({\color{gray}2.52 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$59.6 \mathrm{ms} \pm 329 \mathrm{μs}\left({\color{gray}2.46 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$45.8 \mathrm{ms} \pm 173 \mathrm{μs}\left({\color{gray}4.01 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$428 \mathrm{ms} \pm 867 \mathrm{μs}\left({\color{gray}0.916 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$97.4 \mathrm{ms} \pm 480 \mathrm{μs}\left({\color{gray}-4.727 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$90.8 \mathrm{ms} \pm 427 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$319 \mathrm{ms} \pm 1.01 \mathrm{ms}\left({\color{red}8.52 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$16.0 \mathrm{ms} \pm 77.3 \mathrm{μs}\left({\color{gray}-1.620 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$16.1 \mathrm{ms} \pm 99.8 \mathrm{μs}\left({\color{gray}0.143 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$16.5 \mathrm{ms} \pm 92.7 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$16.9 \mathrm{ms} \pm 79.0 \mathrm{μs}\left({\color{gray}4.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$19.0 \mathrm{ms} \pm 126 \mathrm{μs}\left({\color{gray}-0.063 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.7 \mathrm{ms} \pm 90.2 \mathrm{μs}\left({\color{gray}-2.793 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$15.7 \mathrm{ms} \pm 84.7 \mathrm{μs}\left({\color{gray}0.076 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$16.1 \mathrm{ms} \pm 93.2 \mathrm{μs}\left({\color{gray}1.61 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$16.4 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-0.344 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$23.6 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}-0.058 \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.9 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}-1.827 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$31.6 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{red}5.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$31.1 \mathrm{ms} \pm 269 \mathrm{μs}\left({\color{gray}2.69 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$31.5 \mathrm{ms} \pm 288 \mathrm{μs}\left({\color{gray}-0.453 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$31.8 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}4.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.8 \mathrm{ms} \pm 339 \mathrm{μs}\left({\color{gray}0.962 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$30.9 \mathrm{ms} \pm 339 \mathrm{μs}\left({\color{gray}0.615 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$30.7 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}-0.889 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$31.7 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}0.940 \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.86 \mathrm{ms} \pm 52.4 \mathrm{μs}\left({\color{gray}0.638 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$90.4 \mathrm{ms} \pm 489 \mathrm{μs}\left({\color{gray}2.45 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$143 \mathrm{ms} \pm 546 \mathrm{μs}\left({\color{gray}-0.102 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$98.4 \mathrm{ms} \pm 588 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$107 \mathrm{ms} \pm 453 \mathrm{μs}\left({\color{gray}0.313 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$115 \mathrm{ms} \pm 481 \mathrm{μs}\left({\color{gray}0.516 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$123 \mathrm{ms} \pm 476 \mathrm{μs}\left({\color{gray}0.708 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$86.1 \mathrm{ms} \pm 426 \mathrm{μs}\left({\color{gray}-1.604 \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 $$116 \mathrm{ms} \pm 587 \mathrm{μs}\left({\color{gray}-1.074 \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 $$94.2 \mathrm{ms} \pm 522 \mathrm{μs}\left({\color{gray}-0.559 \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 $$104 \mathrm{ms} \pm 526 \mathrm{μs}\left({\color{gray}-0.552 \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 $$106 \mathrm{ms} \pm 496 \mathrm{μs}\left({\color{gray}-0.108 \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 $$107 \mathrm{ms} \pm 525 \mathrm{μs}\left({\color{gray}0.347 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$140 \mathrm{ms} \pm 629 \mathrm{μs}\left({\color{gray}2.73 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$141 \mathrm{ms} \pm 471 \mathrm{μs}\left({\color{red}5.62 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$105 \mathrm{ms} \pm 616 \mathrm{μs}\left({\color{red}163 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$583 \mathrm{ms} \pm 2.99 \mathrm{ms}\left({\color{gray}1.03 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

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 > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant