fix(designer): Performance improvement by removing spread accumulators in the code #4619
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on refactoring and optimizing the codebase. The changes include adding new strings to the localization file, modifying the way objects are spread in reduce functions, and simplifying array manipulations.
Localization:
Localize/lang/strings.json
: Added new strings for debug logic app project error text and instructions to start the project. [1] [2]Refactoring reduce functions:
apps/Standalone/src/desginer/app/AzureLogicAppsDesigner/DesignerCommandBar.tsx
: Refactored reduce functions in theDesignerCommandBar
component to avoid unnecessary object spreading. [1] [2]apps/Standalone/src/desginer/app/AzureLogicAppsDesigner/Services/ConsumptionSerializationHelpers.ts
: Simplified the reduce function intraverseDefinition
.apps/vs-code-designer/src/app/utils/codeless/connection.ts
: Simplified the reduce function inresolveSettingsInConnection
.apps/vs-code-react/src/app/export/workflowsSelection/helper.ts
: Simplified the reduce function inparseResourceGroups
.apps/vs-code-react/src/app/overview/app.tsx
: Replaced spread operator withconcat
inOverviewApp
.libs/designer-ui/src/lib/floatingactionmenu/floatingactionmenuinputs/helper.ts
: Simplified the reduce function inserialize
.libs/designer-ui/src/lib/html/plugins/toolbar/helper/util.ts
: Simplified the reduce functions for encoding and decoding unsafe characters.libs/designer-ui/src/lib/monitoring/values/keyvaluepairs.tsx
: Simplified the reduce function inKeyValuePairs
.libs/designer-ui/src/lib/settings/settingsection/dictionary/simpledictionary.tsx
: Simplified the reduce function inSimpleDictionary
.libs/designer/src/lib/core/actions/bjsworkflow/serializer.ts
: Simplified multiple reduce functions in this file. [1] [2] [3] [4] [5] [6]Simplifying array manipulations:
libs/designer/src/lib/core/utils/loops.ts
: Simplified the creation ofoperationInfos
object inisForeachActionNameForLoopsource
.libs/designer/src/lib/core/utils/outputs.ts
: Simplified the creation ofdynamicOutputs
object ingetUpdatedManifestForSchemaDependency
.libs/designer/src/lib/core/utils/parameters/dynamicdata.ts
: Simplified the creation ofoutputs
object ingetDynamicOutputsFromSchema
.Other changes:
biome.json
: Removed thenoAccumulatingSpread
rule from theperformance
section.libs/designer/src/lib/core/state/workflow/workflowSelectors.ts
: Simplified the reduce function inreduceCollapsed
and fixed a typo in the import statement. [1] [2]