Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edge names aren't right in Parent / reverse mode in the interactive UI #6

Open
NHDaly opened this issue Jul 19, 2024 · 2 comments
Open

Comments

@NHDaly
Copy link
Member

NHDaly commented Jul 19, 2024

Normal mode:

 "QueryEvaluator"/mod @ 5444 (↓16, ↑3431) 376B / 18.551MB
     -→ "bindings"/intr → "SimpleVector"/svec @ 13520960 (↓1531, ↑1) 12.264KB / 18.534MB

Parent:

 "SimpleVector"/svec @ 13520960 (↑1, ↓1531) 12.264KB / 18.534MB
     ←- "owner"/prop ← "QueryEvaluator"/mod @ 5444 (↑3431, ↓16) 376B / 18.551MB
@Drvi
Copy link
Member

Drvi commented Jul 19, 2024

So the issue is that the in Edges, the names and types are only valid in the to_pos direction, not the _from_pos:

struct Edges
    type::Vector{Int8}         # index into `snapshot.meta.edge_types`
    name_index::Vector{UInt32} # index into `snapshot.strings`
    to_pos::Vector{UInt32}     # index into `snapshot.nodes` (outgoing edge)
    _from_pos::Vector{UInt32}  # index into `snapshot.nodes` (inbound edge)
end

So ways to fix this:
a) Don't print the backward pointing edge info
b) Compute the correct backward pointing edge during rendering (potentially slow)
c) Store additional version of type and name_index (I worry about memory pressure)

@NHDaly
Copy link
Member Author

NHDaly commented Jul 19, 2024

I think I follow, but not completely.

Would a solution be to change _from_pos to point to the edge indexes rather than the nodes?
I have to admit that this struct-of-arrays storage format is hard for me to wrap my head around 😬

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

No branches or pull requests

2 participants