code optimization

This commit is contained in:
2025-09-02 15:21:13 +05:30
parent 175f6eac4f
commit 4f8bf81a60
162 changed files with 2381 additions and 2822 deletions

View File

@@ -2,7 +2,6 @@ import { extractTriggersFromPoint } from "./extractTriggersFromPoint";
export function determineExecutionOrder(products: productsSchema): Action[] {
// Create maps for all events and points
const eventMap = new Map<string, EventsSchema>();
const pointMap = new Map<string, PointsScheme>();
const allPoints: PointsScheme[] = [];
const spawnActions: Action[] = [];
@@ -10,7 +9,6 @@ export function determineExecutionOrder(products: productsSchema): Action[] {
// First pass: collect all points and identify spawn actions
products.forEach(product => {
product.eventDatas.forEach(event => {
eventMap.set(event.modelUuid, event);
if (event.type === 'transfer') {
event.points.forEach(point => {
@@ -34,7 +32,7 @@ export function determineExecutionOrder(products: productsSchema): Action[] {
// Check for spawn actions in storage units and other types
if (event.type === 'storageUnit') {
const storagePoint = event.point as StoragePointSchema;
const storagePoint = event.point;
storagePoint.actions.forEach(action => {
if (action.actionType === 'retrieve') {
spawnActions.push(action);