Skip to content

fix: app slow loading workflows#4478

Merged
midigofrank merged 5 commits intomainfrom
3675-app-slow-loading-workflows
Mar 5, 2026
Merged

fix: app slow loading workflows#4478
midigofrank merged 5 commits intomainfrom
3675-app-slow-loading-workflows

Conversation

@doc-han
Copy link
Copy Markdown
Contributor

@doc-han doc-han commented Mar 4, 2026

Description

This PR optimises the db query on the workflows list page. instead of doing 5 queries per workflow on the page. we collect the workflow ids and do a single batch query per group.

Closes #3675
Closes #2426

Validation steps

Non technical

  1. How fast does opening a project now feel?

Technical

  1. Check the number of queries being fired(in terminal) whenever you try to open a project to view the list of workflows

Additional notes for the reviewer

  1. (Is there anything else the reviewer should know or look out for?)

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@doc-han doc-han linked an issue Mar 4, 2026 that may be closed by this pull request
2 tasks
@github-project-automation github-project-automation Bot moved this to New Issues in Core Mar 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.48%. Comparing base (734287a) to head (3f997d4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4478      +/-   ##
==========================================
+ Coverage   89.43%   89.48%   +0.05%     
==========================================
  Files         425      425              
  Lines       20253    20303      +50     
==========================================
+ Hits        18113    18169      +56     
+ Misses       2140     2134       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@doc-han doc-han requested review from elias-ba and midigofrank March 4, 2026 09:27
@doc-han doc-han marked this pull request as ready for review March 4, 2026 09:27
@doc-han doc-han requested a review from stuartc March 4, 2026 11:32
Copy link
Copy Markdown
Collaborator

@midigofrank midigofrank left a comment

Choose a reason for hiding this comment

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

Nicely done @doc-han . This will definitely improve the loading times. Can we do a follow up issue that uses async_assigns to load the stats? https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-async-assigns

---EDIT---

I have created it here: #4489

@midigofrank midigofrank merged commit 938ec52 into main Mar 5, 2026
7 checks passed
@midigofrank midigofrank deleted the 3675-app-slow-loading-workflows branch March 5, 2026 08:17
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

App slow loading workflows Project dashboard and work order history loads slowly

2 participants