Repository navigation
Description
This issue was auto-created as part of the Zenhub sub-issues migration. The original entity was opened on 2025-02-19. For more details see this post.
The Problem
Accounts with a large number of affiliations (say, more than 1000) take an unacceptable amount of time to fetch and display the affiliations in the Business Registry Dashboard UI. Delays of over 15 seconds are common. There is one account in Production with over 20,000 affiliations that fails to load after trying to fetch the data for over 2 minutes. The issue is seen to a lesser extent with fewer than 1000 affiliations. The number of affiliations is expected to grow for some accounts.
The root cause is that the Business Registry Dashboard UI displays affiliations with the latest NR or business state, so the following must be aggregated:
- Auth data (the affiliations for the given account)
- NR data (latest state for each affiliated NR)
- Business data (latest state for each affiliated business)
Because a large number of records are being handled, fetching the data from the respective APIs, combining it, and displaying it in the UI takes significant time. Note that the UI also becomes slow to respond to inputs when it contains a large number of affiliations (say, more than 1000).
Goals
- Filtering and pagination must work as expected to the user.
- Performance must be good and scalable. (Maybe no more than 5 seconds to display the affiliations table.)
- Cross-API pollution should be minimized (eg, Auth should only know about affiliations, Namex should only know about NRs, and LEAR should only know about businesses).
- A solution that could be implemented for MVP is required (ie, changes must be minimal). A longer-term solution could also be planned.
The Basic Solution
We need to handle smaller amount of data at a time (at least in the UI). This would be done by "paging" results (eg, show only 100 at a time).
However, it is expected that users will use filtering (eg, show only "Approved" NRs) or searching (eg, show only business "BC1234567") to quickly access the item they want to manage. For filtering and pagination to work together correctly, first all the records for the subject account need to be filtered, then the first 100 (or next 100, etc) need to be returned. Therefore, a large amount of data is still being handled at some point, but filtering/paging as close to the db as possible means less data transfer and faster API operations.
See ticket #25080 for a discussion of possible approaches and options.
Activity
vikas-gov commentedon May 9, 2025
[Original comment by @vikas-gov posted on Apr 3, 2025]
The work is dependent/pending on LEAR migration (GCP work , ETA 25 April 2025)
-- Required latest by May 01 for the performance work to be done in time
Rajandeep98 commentedon May 9, 2025
[Original comment by @Rajandeep98 posted on Apr 28, 2025]
phase 1 : Search parameters passed to auth, lear and namex
53 remaining items
[-]BRD Performance Issues - page loading with lots of affiliations[/-][+]BRD - Performance Issues (page loading with lots of affiliations)[/+]OlgaPotiagalova commentedon Jul 21, 2025
Changes have been deployed to Prod now and activated for a couple of law firms with many affiliations.
Improvements:
Firm with 20,000+ affiliations - loading time ~4 sec (the page wasn't loading before)
Firm with 1171 affiliations - loading time ~2 sec (used to be 8-10 sec) - TBD
mstanton1 commentedon Feb 25, 2026
All tickets on epic have been completed. This epic is being closed. If further BRD work is needed a BRD Enhancements and Bugs epic has been created along with a Post MVP BRD epic.