Skip to content

Pushing Operations to Transaction sometimes slow #1102

@joepio

Description

@joepio

While @Polleps was working on a migration to use JSON values #658, he noticed that re-builiding the index Db::build_index was very slow. 100ms per resource, where this should be at least 100x faster.

I played around a bit with his instance to find things that are slow, and it seems like the add_atom_to_prop_val_sub_index is very slow. This surprised me, since this does not even have IO, it just:

  • Creates an Operation struct. This is just a struct with two enums and a bytestring
  • Pushes that to a Vec (Transaction). A push operation is O(1), so should be instant. It doesn't apply the transaction yet.

So this should be nanosecond scale!

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