Skip to content

OctreeLoader does not reuse Workers when loading a new pointcloud #180

Description

@Jordan-Lane

When loading a new Potree2 model, the OctreeLoader class does not re-use existing Workers. This means that everytime a new Pointcloud is added, both a new WorkerPool and new Workers are created for that specific PointCloud. This is a performance issue, and could cause the browser to crash if too many PointClouds are generated over the lifetime of the app.

You can easily reproduce this issue with the example in this repo. Load the example, and repeatedly 'Load' and 'Unload' the Potree2 model. You will see new Workers are generated every time the PointCloud is loaded. I was able to easily generate 50+ workers by toggling the PointCloud on and off:

Image

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions