perf(push_child): defer unparent until evaluation#78
Conversation
|
Did a quick test with this. Improves my performance a lot, but I did encounter a new error for some reason. I'll leave the traceback, in case it helps. I can try looking into what specific type of graph causes the issue later today. It's a specific source update where it happens consistently, but all other sources seem fine ¯\_(ツ)_/¯ Also I'm using alicesaidhi's fork with types, but I hope that's not relevant because the graph code is pretty much unchanged compared to centau's. Here's the traceback: |
|
how did u merge them ? id like see exactly the code. I will take a look here, but would be useful a minimal repro |
| local parents = node.parents | ||
| for i = node.pushing_parent_index+1, #parents do | ||
| -- assert(parent.pushing_parent_index ~= TEMPORALLY_UNPARENTED) | ||
| -- if do error here, a stack overflow error would error later |
There was a problem hiding this comment.
probably this is the minimal repro of the error you get there, but there maybe you have a condition before the infinite re-entrancy happen
|
Hey @ernisto, finally got time to make a repro for the error I had. It could probably be simplified further, but I think this is enough to get you on the right track. Also, this time I tested with the the main repo Vide, your code exactly, and the issue is still present. |
|
the commit i made yesterday doesnt really fix the issue, just make clearer the real issue |
vide doesnt have deep equal table check, so it does the infinite re-entrant updates. Even on vide almost sure it will error stack overflow, so for your specific case, you could fix this by using local tbl = vide.untrack(tblSrc)
tbl[k] = nil
tblSrc(tbl) |
|
Oh right, can't believe I missed the untrack there 🤦 In that case, I'm more surprised by my code not erroring on the main branch. |
No description provided.