Fix resultBuilt(dirty mechanism) in hls-graph
Fix #4237
resultBuilt might updated to an older value, which make a rule result that should be clean back to dirty.
It might trigger un-needed recomputation. Fixing it could minimize the recomputation further.
Do we have any tests for this mechanism? hls-graph is reasonably stand-alone, I would hope we could write a test for this?
this seems to make sense. how did you discover this?
Actually, I've discovered the Changed and Built are somewhat off when fixing the dritiness hiding problem, but I forget about it at the time since it it won't hide the dirtiness but instead increase the chance of it.
I am reviewing the code and it comes back to me.
Yep, I'll see if some test could be added.
I've added two test, one from the lower level and one from higher level to demonstrate the bug and ensure no regression.
I'd like @wz1000 to check the tests make sense just to be sure!
nag @wz1000
Let's merge it if no one object to this. I've been using this branch and no regression yet. And the bench reuslt look pretty promising