Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-18994 Improve Webentry API endpoints performance [SUMMER] #1733

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

caleeli
Copy link
Contributor

@caleeli caleeli commented Oct 8, 2024

Performance Improvement required for WebEntry endpoints

The following main points were improved:

  • Submit a webentry form api/1.0/webentry/requests/1076/node_35/submit
  • Load and render the screen in web entry: /api/1.0/webentry/tasks/11695/screen?include=screen,nested

This were taking many time compared the rest of endpoints.

  • Compared to the total time (submit + script task execution + routing + screen rendering)
  • submit (1.04s): its timing represents 33% of all the time.
  • render screen (1.75s): 45% of all the time
  • script + routing (0.78): 21% of the time

Issue & Reproduction Steps

WebEntry endpoints are slow.
This was caused by two features:

  • Sanitize data when a webentry (task) is submited
  • Get screen with nested screens

Solution

  • Implement a Screen Cache for screens and nested screens.
  • This cache stores a screen by process, by language and by version
  • The cache is cleared when a process translation is updated or the screen is modified.
ImproveWebEntryEndpoints.mov

How to Test

  • Run a web entry like Expenses process
  • You will see a cache was created for the web entry task screens
  • Any time the screen is updated the cache is cleared

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.

ci:processmaker:FOUR-18994
ci:package-webentry:FOUR-18994

Copy link

cypress bot commented Oct 8, 2024

screen-builder    Run #1443

Run Properties:  status check passed Passed #1443  •  git commit b24af166a6: FOUR-18994 Improve Webentry API endpoints performance [SUMMER]
Project screen-builder
Run status status check passed Passed #1443
Run duration 07m 41s
Commit git commit b24af166a6: FOUR-18994 Improve Webentry API endpoints performance [SUMMER]
Committer David Callizaya
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 19
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 297

@ryancooley ryancooley merged commit 56feeff into release-2024-summer Oct 18, 2024
25 of 26 checks passed
@ryancooley ryancooley deleted the FOUR-18994 branch October 18, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants