Skip to content

inefficient vector reserves #292

Description

@aborkai

Recently we came across IFC files with a lot of complex meshes. The performance was greatly reduced, and with profiling we were able to find one cause at the given location. It seems, the vector is reserved incrementally, which results unnecessary amount of relocation. Our fix was to iterate through the meshes and count the amount of elements and reserve the vector only once before insertations.

polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end());

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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