Skip to content

Slow commit processing for large set calls in arrays #651

Open
@joepio

Description

@joepio

Pressing enter a bunch of times in a large document leads to slow responses. Like, 1s + responses.

I need to know why these commits are so hard to process. They should be way faster.

I checked out the --trace chrome --log-level trace json file in perfetto, which showed me that for every item in the set call, atomic-server does a check_if_atom_matches_watched_query_filters, which takes about 10 milliseconds.

There are probably a bunch of ways in which we can make this more efficient:

Do not process every atom, only those who are different

If we go from [a,b,c,d] to [a,b,c,e], we could ignore [a,b,c]. We can make a diff, and only remove d and add e.

Make check_if... faster

I'm not sure how, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions