Skip to content

Autostaple is slow for very large origami #1064

@beanbeanjuice

Description

@beanbeanjuice

Since PR #1062, running autostaple on very large origami takes a few seconds to fully complete.

The exact reason is unknown, but it is suspected that it is somewhere within the actual algorithm.

It should be noted that running this same algorithm for the very large origami in the python package takes less than a second so the issue may be due to the translation of the algorithm from Python to Dart.

In the Chrome development tools, under the performance tab, you can use the record feature to determine exactly what, where, and how much performance is being used in each part of the program. The best thing to do is open the example very large origami, click record in the performance tab, run autostaple, stop the recording once autostaple is done. It will present you with a "flame graph" similar to the picture below.

It should also be noted that there are weird "intervals" with the flame graph. I'm not sure why there seems to be some splits between certain sections at what look like irregular intervals.

Image

The video below can help demonstrate how to debug this problem.

flame.graph.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions