Skip to content

Conversation

@khoale88
Copy link
Contributor

@khoale88 khoale88 commented Nov 2, 2025

  • auto generate a hint from node json data.
  • use node indexer for hint generator when indexing available.

@khoale88 khoale88 force-pushed the issue-63 branch 4 times, most recently from 9951063 to ae42c6a Compare November 2, 2025 14:59
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 2, 2025

CodSpeed Performance Report

Merging #82 will not alter performance

Comparing khoale88:issue-63 (01c6255) with master (9a12b88)

Summary

✅ 81 untouched
🆕 16 new

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 test_no_hints[DiGraph] N/A 15.6 ms N/A
🆕 test_no_hints[MultiDiGraph] N/A 15.7 ms N/A
🆕 test_node_double_jsondata_hints[DiGraph] N/A 36.7 ms N/A
🆕 test_node_double_jsondata_hints[MultiDiGraph] N/A 36.7 ms N/A
🆕 test_node_jsondata_and_explicit_hints[DiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_and_explicit_hints[MultiDiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_hints[DiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_hints[MultiDiGraph] N/A 17.1 ms N/A
🆕 test_no_hints[DiGraph] N/A 15.6 ms N/A
🆕 test_no_hints[MultiDiGraph] N/A 15.7 ms N/A
🆕 test_node_double_jsondata_hints[DiGraph] N/A 35.5 ms N/A
🆕 test_node_double_jsondata_hints[MultiDiGraph] N/A 35.5 ms N/A
🆕 test_node_jsondata_and_explicit_hints[DiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_and_explicit_hints[MultiDiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_hints[DiGraph] N/A 17 ms N/A
🆕 test_node_jsondata_hints[MultiDiGraph] N/A 17.1 ms N/A

@j6k4m8
Copy link
Member

j6k4m8 commented Nov 3, 2025

still reading through this but I love it so far! want to be sure I fully understand Indexers before merging, they seem like an amazing opportunity for some performance improvements to this codebase :)

@khoale88
Copy link
Contributor Author

khoale88 commented Nov 3, 2025

Sorry for the lack of documentation. Instead of complex Btree support fastter write, ArrayIndexer will have everything sorted in ascending order, and any searching would be logN. However, it hasn't deal with None value for now.

@khoale88
Copy link
Contributor Author

khoale88 commented Nov 5, 2025

I will handle null value with indexter in the #69

@khoale88 khoale88 force-pushed the issue-63 branch 2 times, most recently from 65e6b33 to a9a7178 Compare November 13, 2025 15:07
@khoale88
Copy link
Contributor Author

@j6k4m8 I rebase this to the subquery PR, so you see there're a lot. But if you merge the PR and rebase this once more, change will be small.

I changed the implementation a little bit. I don't compute the node hints before hand. Instead, When the match happens, I convert the motif to indexer condition ast and then AND it with the where ast. This is much cleaner.

I also enable node auto hint by default.

I think it's worth to do 3 other indexing feature to complete this one.

  • labels indexing. This is used in node label match.
  • null attributes indexing. This is to handle null value faster.
  • in operators in index queriers.

- check if node and edge from hints are valid matches
…).

- auto generate a hint from node json data.
- use node indexer for hint generator when indexing available.
@j6k4m8
Copy link
Member

j6k4m8 commented Nov 13, 2025

Once the benchmarks finish, can I merge this in? :)

@khoale88
Copy link
Contributor Author

Yes, please.

@j6k4m8 j6k4m8 merged commit 76e458e into aplbrain:master Nov 13, 2025
7 checks passed
@j6k4m8
Copy link
Member

j6k4m8 commented Nov 13, 2025

Hooray! :D

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants