camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.47k stars 472 forks source link

No loop rule significantly reduces the application performance on big diagrams #4401

Open barmac opened 1 week ago

barmac commented 1 week ago

Describe the bug

The diagram from the support ticket makes the application unresponsive, and this is due to the linting (no-loop rule).

image

Steps to reproduce

  1. Open the diagram from the support ticket
  2. now this happens

Expected behavior

The linting should not slow down the application significantly.

Environment

Additional context

SUPPORT-22488

barmac commented 6 days ago

Ideas:

  1. Run linter in a worker (difficult because we need to pass the model)
  2. Limit the number of elements tested for the no-loop rule

The rule is implemented in https://github.com/camunda/bpmnlint-plugin-camunda-compat/blob/main/rules/camunda-cloud/no-loop.js

nikku commented 6 days ago

Let's attempt to solve this in an algorithmic manner first. I suggest anyone picking to check the following (or other) resources: