Skip to content

New copy method is far slower than old copy method #393

@jakebeal

Description

@jakebeal

I've started converting SBOL-utilities entires over to the new copy method.
In doing so, however, I have found that it is dramatically slower than the old.

A good example of this, when running the test_expansion test in test_expand_combinatorial_derivations@27a281d the copy command at line 36 took 10.2 seconds to run. Previously, it took only 0.28 seconds to run.

Profiling suggests that nearly all of the time is being spent in deepcopy, which was not used in the prior copy method:

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
28258411/286   28.926    0.000   71.302    0.249 copy.py:128(deepcopy)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions