Skip to content

BRD - Performance Issues (page loading with lots of affiliations) #27909

Closed
44 of 44 issues completed
Closed

Description

@severinbeauvais

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

  1. Filtering and pagination must work as expected to the user.
  2. Performance must be good and scalable. (Maybe no more than 5 seconds to display the affiliations table.)
  3. 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).
  4. 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.

Sub-issues

Sub-issues

44 of 44 Issues completed
Loading 44 sub-issues

Activity

  1. added
    Entities Team
    on May 9, 2025
  2. vikas-gov commented on May 9, 2025

    @vikas-gov
    Collaborator

    [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

  3. Rajandeep98 commented on May 9, 2025

    @Rajandeep98
    Collaborator

    [Original comment by @Rajandeep98 posted on Apr 28, 2025]

    image.png

    phase 1 : Search parameters passed to auth, lear and namex

  4. 53 remaining items

  5. changed the title [-]BRD Performance Issues - page loading with lots of affiliations[/-] [+]BRD - Performance Issues (page loading with lots of affiliations)[/+] on Jul 17, 2025
  6. OlgaPotiagalova commented on Jul 21, 2025

    @OlgaPotiagalova
    Collaborator

    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

  7. mstanton1 commented on Feb 25, 2026

    @mstanton1
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Entities Team

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions