Skip to content

getSectionChanges can be slow for very large transactions #103

@chrisballinger

Description

@chrisballinger

When doing a batch transaction with ~7000 updates, I get only one YapDatabaseModifiedNotification for which I call getSectionChanges:rowChanges:forNotifications:withMappings: as seen here.

This method takes ~10-15 seconds to complete, and I am calling it on the main thread. Would you consider it safe to call this method or otherwise updating mappings from a background queue? (as long as the following UI updates are triggered on the main thread, of course)

It would probably be a nicer user experience if I split the batch transaction into smaller chunks for faster feedback anyway, but I was curious if there were any side effects to updating mappings in the background. I feel like I'd have to be more careful about synchronization to prevent reading from the mappings while they were being updated in the background, so it would be rather complex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions