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

Improve document route performance #335

Merged
merged 39 commits into from
Sep 29, 2023

Conversation

jeffdaley
Copy link
Contributor

@jeffdaley jeffdaley commented Sep 11, 2023

Improves performance of the /document route by moving non-essential tasks out of the model.

One-way tasks, i.e., those that don't affect local properties, are now void-called in the afterModel hook. User avatars are loaded by a new <HermesUsers> component that returns avatar imgURLs from an array of emails (including Stakeholders and any other PEOPLE-type CustomEditableField). docType continues to be a model attribute, but we no longer await it. Instead, we provide the promise to the component to be awaited contextually.

Plus:

  • Tweaks the EditableField API to differentiate between isLoading and isSaving states.
  • Improves CSS to minimize layout shift when loading

@jeffdaley jeffdaley changed the title Improve Document route performance PENDING: Improve Document route performance Sep 11, 2023
@jeffdaley jeffdaley changed the title PENDING: Improve Document route performance Improve Document route performance Sep 20, 2023
@jeffdaley jeffdaley changed the title Improve Document route performance Improve document route performance Sep 20, 2023
@jeffdaley jeffdaley marked this pull request as ready for review September 20, 2023 23:43
@jeffdaley jeffdaley requested a review from a team as a code owner September 20, 2023 23:43
@jeffdaley jeffdaley added the enhancement New feature or request label Sep 26, 2023
@jeffdaley jeffdaley changed the title Improve document route performance WIP: Improve document route performance Sep 28, 2023
@jeffdaley jeffdaley marked this pull request as draft September 28, 2023 21:30
@jeffdaley jeffdaley marked this pull request as ready for review September 29, 2023 19:05
@jeffdaley jeffdaley changed the title WIP: Improve document route performance Improve document route performance Sep 29, 2023
Copy link
Contributor

@jfreda jfreda left a comment

Choose a reason for hiding this comment

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

📈

@jeffdaley jeffdaley merged commit abd0492 into main Sep 29, 2023
2 checks passed
@jeffdaley jeffdaley deleted the jeffdaley/document-route-performance branch September 29, 2023 21:02
@jeffdaley jeffdaley restored the jeffdaley/document-route-performance branch October 3, 2023 20:10
@jeffdaley jeffdaley deleted the jeffdaley/document-route-performance branch October 3, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants