Skip to content

Async and reactive bugs after annotation updates #36

Description

@elmisback

While testing the system for the video, I saw major issues with async updates and hacked a temporary fix into the updateAnnotation function (after an async edit completes, we completely ignore the value in this.annotations and overwrite with our own value)

public async updateAnnotation(document: vscode.TextDocument, updatedAnnotation: Annotation): Promise<void> {
. This probably risks losing data if a bad sequence of async updates occurs.

Instead, we should process updates synchronously. This may require forming an update queue or throwing away updates that occur when the system is busy.

There's a separate issue of many update calls being triggered after a single user action due to reactive updating. This should be documented on this issue. Ideally, the logic should be carefully re-coded to limit reactions to cases where they are necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions