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

feat(UI): add pagination for detail views in process instance improves rendering time for large workflows #358

Conversation

nitram509
Copy link
Collaborator

@nitram509 nitram509 commented Jan 19, 2022

Motivation:
While using this Simple Monitor for some performance tests, I realized that instances with 300+ events
(let it be timers, jobs, incidents etc.) lead to trouble loading the DOM in the browsers. The reason for that is simple:
the process instance view did server-side rendering all information as HTML tables. This led to 5MB+ large HTML files,
which took ca. 10s to load the DOM in Chrome, on my MacBook Pro.
Some more extreme tests with 3000+ events also lead to server-side timeouts.

This PR tries to solve the performance issue by keeping the server-side rendering and introducing pagination
per individual detail view (timers, jobs, audit log, etc.)

This PR covers:

  • refactoring: move all DTOs into their own package
  • refactoring: split almighty ViewController into multiple ones, per each main view (see top navigation)
  • refactoring: split InstanceViewController into multiple smaller ones, per each detail view
  • refactoring: split process instance detail views into multiple pages in order to introduce pagination
  • refactoring: re-formatted code, using google java code style, as stated in camunda-cloud/zeebe contribution guidelines

I left the individual commits in, in case someone likes to see the intermediate refactoring steps.

Resulting from the refactorings, the behavior in the UI is now slightly different.
Each subview in the process instance view is now a standalone page. This means not all details are loaded at once anymore,
but the *ViewController makes use of Spring's Pageable methodology.
The result is significantly faster page loading and rendering.

Here's how the UI looks now... (visually the same, except we have introduced new query parameter)
Screenshot 2022-01-25 at 09 43 31

Any feedback is welcome.

@nitram509 nitram509 marked this pull request as draft January 19, 2022 19:09
(variables, audit log, incidents, jobs, message subscriptions, timers, called process instances, errors)
@nitram509
Copy link
Collaborator Author

@saig0 without putting any pressure, I just want to "ping" the PR is now considered ready.

@nitram509 nitram509 marked this pull request as ready for review January 25, 2022 09:00
@saig0 saig0 self-requested a review January 25, 2022 09:00
@saig0
Copy link
Contributor

saig0 commented Jan 25, 2022

@nitram509 awesome 🎉
I'll review the PR as soon as I can. But currently, it is not so easy for me to find the time for my side projects 😭

@nitram509
Copy link
Collaborator Author

Thank you @saig0 for your support 👍

Copy link
Contributor

@saig0 saig0 left a comment

Choose a reason for hiding this comment

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

@nitram509 awesome 🎉
This is a huge improvement 🚀

Personally, I would prefer more composition over inheritance but it works and we don't need to change it now. Thank you for this contribution 🥇

@saig0 saig0 merged commit 5676c89 into camunda-community-hub:master Jan 28, 2022
@nitram509 nitram509 deleted the process-instance-pagination-performance-improvement branch February 15, 2022 08:09
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.

2 participants