Repository navigation
Bugfix load workflow opt - #1435
Merged
Merged
Conversation
...by freezing joint paper until all updates are complete, skipping unnecesarry rendering
...by batching the addition of new operators with one addcells() / resetcells() call
ContextManager with RXJS event streams
it now buffers input while the joint graph wrapper is in an async context
accidentally made SyncTexeraGraph listeners asynchronous via createContextAwareStream(jointCellAddStream) . This caused them to not be disabled by this.setSyncTexeraGraph(false); which is commonly used internally to temporarily sidestep synchronization . I've applied the context awareness more specifically to handleLinkBreakpointToolAttachment(), where it's specifically needed.
as an RXJS pipeable operator named bufferWhileAsync. Also moved it inside JointGraphContext
set to protected funcs. Use withContext instead
use "this" instead of classname. allows for method overriding
highlight/unhighlight operations fail unless buffered until the end of joint-graph async context, It is no longer guaranteed that the unhighlight event will be recieved before the element is deleted due to buffering of events. (although such guarantees were never documented)
... if reloadworkflow is called without using async context. This was due to addCells being intrinsically an asynchronous operation that buffers changes to the actual dom Fix was to wrap all addCells contexts in their own async context. This shouldn't harm reload performance, since the workflow is only reloaded when context changes from async to synchronous
zuozhiw
approved these changes
Mar 4, 2022
zuozhiw
left a comment
Contributor
There was a problem hiding this comment.
Looks good, I have tested the implementation again and the bugs I found are gone
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
# Continuation of apache#1433 Thanks @zuozhiw for fixing a breakpoint related bug. I don't actually know how to test that yet. ### REFACTORS - createContextAwareStream --> custom RXJS pipeable operator named bufferWhileAsync: I.E `source$.pipe(bufferWhileAsynce)` - ContextManager enter/exit are now protected (from public). ### BUGS - Bug: Anomalous rendering when changing workflows Fix: re-add request an updateView() after the async period (mistakenly removed) - Bug: Can't highlight element because it doesn't exist (yet) Fix: Buffer highlight events to run after the async period. Introduce more bugs - Bug: Can't unhighlight element because it doesn't exist (anymore) (due to previous "fix") WontFix: Update highlighed list but don't actually call unhighlight() (it's already deleted after all) > A unhighlight event is emitted when an element is deleted. Due to buffering, it will only be handled after the async period, after the element is deleted (This behavior can be changed if needed) > However, It was never a documented guarantee that an unhighlighted element would still exist at the time it's event is handled. I don't think this is a big loss, so from now on, it's explicitly NOT GUARANTEED Co-authored-by: zuozhiw <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #1433
Thanks @zuozhiw for fixing a breakpoint related bug. I don't actually know how to test that yet.
REFACTORS
source$.pipe(bufferWhileAsynce)BUGS
Bug: Anomalous rendering when changing workflows
Fix: re-add request an updateView() after the async period (mistakenly removed)
Bug: Can't highlight element because it doesn't exist (yet)
Fix: Buffer highlight events to run after the async period. Introduce more bugs
Bug: Can't unhighlight element because it doesn't exist (anymore) (due to previous "fix")
WontFix: Update highlighed list but don't actually call unhighlight() (it's already deleted after all)