Skip to content

Performance improvement / Diff calculation #5

@mikeger

Description

@mikeger

We tried to use the AwesomeTableAnimationCalculator in production for our app, but it did not work out due to performance issues.

We observed the significant CPU usage hit on diff calculation. The diff calculation involves plenty of Array.indexOf() calls, and those cost ~O(n) where n is the size of the array.

I've tried to port the framework to use NSOrderedSet where the lookup is O(1), but did not succeed because ordered set is looking objects up not by hash but by memory address, and as log as the data source objects are copied, the lookup can not be successful.

Possible option could be to use one of implementations of ordered set that are done in swift.

PS: If needed I can provide the port implementation that I've done to try NSOrderedSets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions