-
Notifications
You must be signed in to change notification settings - Fork 554
refactor(tree): Support pausing Tree events for table operations #25298
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
base: main
Are you sure you want to change the base?
refactor(tree): Support pausing Tree events for table operations #25298
Conversation
…ring-transactions
@@ -768,33 +786,10 @@ export class AnchorSet implements AnchorLocator { | |||
} | |||
this.anchorSet.activeVisitor = undefined; | |||
|
|||
// Aggregate changedFields by node. | |||
const eventsByNode: Map<PathNode, Set<FieldKey>> = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewers: extracted into a static function below so it can be reused. This functionality doesn't consume any object state, so no functional changes were required.
@@ -219,9 +219,7 @@ export class TreeNodeKernel { | |||
for (const eventName of kernelEvents) { | |||
if (events.hasListeners(eventName)) { | |||
this.#hydrationState.offAnchorNode.add( | |||
// Argument is forwarded between matching events, so the type should be correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewers: this explicit typing as any
was not needed, so it was removed.
…ring-transactions
@@ -768,6 +768,7 @@ export interface RunTransaction { | |||
|
|||
// @alpha @input | |||
export interface RunTransactionParams { | |||
readonly deferTreeEvents?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: revert this
@@ -66,6 +66,7 @@ import { | |||
|
|||
import { canInitialize, initialize, initializerFromChunk } from "./schematizeTree.js"; | |||
import type { ITreeCheckout, TreeCheckout } from "./treeCheckout.js"; | |||
import { pauseTreeEvents } from "../simple-tree/index.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: revert all these changes
return []; | ||
} | ||
|
||
// Ensure the specified columns exists before starting transaction. | ||
// Ensure the specified rows exists before starting transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: revert this
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
TODO