PromucFlow_constructor/app
Vemparala Surya Vamsi d7d59c63e4
chore: optimise sort when developing the dependencyMap (#40340)
## Description
In the sort comparator, we were repeatedly computing the lengths of the
paths for two nodes, which contributed approximately 0.87 seconds to the
LCP on a Windows machine. We've now optimized this by precomputing the
paths beforehand and then sorting the collection. This change has
reduced the time to around 70ms, effectively eliminating the redundant
computation.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14592179498>
> Commit: d552730a6606b425a8ee33dbe7d8160e78cd0f80
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14592179498&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Tue, 22 Apr 2025 11:29:44 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved internal sorting of dependency nodes for better performance
and maintainability. No visible changes to user functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-22 17:16:50 +05:30
..
client chore: optimise sort when developing the dependencyMap (#40340) 2025-04-22 17:16:50 +05:30
server chore: set cs env for appsmith-ai plugin (#40336) 2025-04-22 05:38:18 -05:00
util chore: Revert "chore: delete redundant files" (#35022) 2024-07-18 16:18:10 +05:30