Skip to content

[Nightly]: 2026.17 perfomance - #9107

Open
pmPaulis wants to merge 54 commits into
developfrom
nightly/2026.17-perfomance
Open

pmPaulis wants to merge 54 commits into
developfrom
nightly/2026.17-perfomance

Conversation

@pmPaulis

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

In this branch already merge all the changes related to the perfomance staff

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

PR Packages

ProcessMaker/screen-builder#1917
ProcessMaker/vue-form-elements#475
https://github.com/ProcessMaker/package-savedsearch/pull/706

rodriquelca and others added 30 commits July 28, 2026 11:03
Introduce PUT /api/1.1/tasks/{id} for COMPLETED status, gated by
TASK_UPDATE_V1_1_ENABLED, with optional raw token persistence behind
TOKEN_PERSISTENCE_RAW_ENABLED.

https://processmaker.atlassian.net/browse/FOUR-32800
Batch-load listing relations after pagination to avoid per-row queries
for process version alternative, active tasks, process categories, and
project assets while preserving the existing API response shape.

- Add ProcessRequestListingRawRepository to hydrate activeTasks (raw SQL)
  and process data (Eloquent + batched projects/categories)
- Use withAggregate for process_version_alternative and read it without
  lazy-loading ProcessVersion
- Add activeTasks relation and use preloaded data in ProcessRequests
- Preload projects JSON and reuse loaded categories in Process accessors
- Apply hydration in index and getRequestsByCase
- Add bounded query-count feature test

https://processmaker.atlassian.net/browse/FOUR-32947
feat(FOUR-32801): improve Jobs execution when the PUT tasks endpoint is executed
feat(FOUR-32800): add v1.1 task completion endpoint with raw SQL path
FOUR-32800: test compares legacy and optimized
devmiguelangel and others added 14 commits September 10, 2026 12:43
…mps are null

Prevent task completion failures when recording the Prometheus
activity_execution_time_seconds histogram in BpmnSubscriber.

Fall back to created_at and completed_at when created_at_ms or
completed_at_ms are unavailable, and skip the metric observation
when either timestamp is still missing.

https://processmaker.atlassian.net/browse/FOUR-33645
FOUR-32144: Improve the api PUT /api/1.0/tasks/{task-id}
FOUR-32946 Improve the API /api/1.0/processes
perf(FOUR-32947): reduce N+1 queries on requests listing (FOUR-32947)
fix(FOUR-33645): guard activity execution time metric when ms timesta…
FOUR-32126: Inbox >> First loading is to slow
@cursor

cursor Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Large behavioral surface area (process list pagination and removed start-event filtering, optional raw SQL for tokens/task completion) with most risky paths gated by config, but optimized tasks default on.

Overview
This PR bundles performance work across API listings, BPMN persistence, the Tasks UI, and the browser.

Listings and hydration: Process index now paginates, qualifies orderBy columns, drops heavy bpmn/svg payloads, and stops loading events for in-loop start-event filtering (that logic is removed from the controller). Process request index skips eager process includes and batch-hydrates process and activeTasks via ProcessRequestListingRawRepository after paginated queries. When OPTIMIZED_TASKS_ENABLED is on (default true), task index delegates to V1_1 indexOptimized with slimmer selects, column-to-field mapping, and an EXISTS-based nonSystem scope for tokens.

Optional raw SQL execution (env flags): TOKEN_PERSISTENCE_RAW_ENABLED routes token/instance updates through TokenPersistenceRawRepository; TASK_UPDATE_V1_1_ENABLED adds PUT /api/1.1/tasks/{id} completion via TaskCompletionRawService and an in-memory engine bridge.

Tasks page caching: /tasks uses tasks-page-etag middleware to return 304 when stable shell context is unchanged; BrowserCache no longer forces no-store when responses already carry an ETag.

Frontend: Axios gets a short-TTL GET cache and in-flight deduplication (apiClientCache.js); process list stops requesting with=events; task edit lazy-loads the Data tab Monaco editor and preloads edit bundles; login prefetches inbox assets.

Smaller fixes: recommendation job deduplication (ShouldBeUnique), safer activity execution metrics, search-index hooks to skip redundant remove jobs, and task edit authorization/view tweaks (canUpdateTask, deferred “viewed” tracking).

Reviewed by Cursor Bugbot for commit 2bcece4. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

nolanpro and others added 4 commits October 20, 2026 08:00
Use npm branch builds for modeler, screen-builder, and vue-form-elements, and Packagist dev-epic/FOUR-32144 for package-savedsearch.

Co-authored-by: Cursor <[email protected]>
cursor[bot]

This comment was marked as resolved.

@decisions-sonarqube

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2bcece4. Configure here.

}

$handledIncludes = ['data', 'processRequest', 'process', 'user', 'draft', 'processRequest.process'];
$additionalIncludes = array_values(array_diff($includes, $handledIncludes));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped processRequest.process include

Medium Severity

processRequest.process is treated as already handled in the optimized task query, but no constrained with() is registered for it. Clients that send that include no longer eager-load the nested process and either miss the relation or lazy-load the full process per row.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2bcece4. Configure here.

'closed' => $repository->saveClosedToken($token),
default => $repository->saveActivatedToken($token),
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raw token saves skip Scout

Medium Severity

When TOKEN_PERSISTENCE_RAW_ENABLED is on, token and request updates run as raw UPDATEs and never call Eloquent save(). Scout indexing and other model observers do not run, so searchable task/request documents go stale after complete/activate even though this PR added wasSearchable* hooks.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Scout wasSearchable must match shouldBeSearchable

Reviewed by Cursor Bugbot for commit 2bcece4. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants