entity
entity copied to clipboard
Legal API - Search Endpoint causing MBR to Timeout
After we enabled the easy legal name fix feature flag, if there are a lot of firms, the MBR is timing out:

The reason is, the search endpoint uses the slim json. The slim json, after the FF was enabled, has the alternateNames array. The alternateNames array uses a function to get them. That's probably what's causing the issue when lots of firms are there.
Need to handle:
- [x] Investigate/Fix the issue
- [x] Verify that loading is faster
- [x] Update unit tests if needed
The search request is taking less time now. The user with huge entities list is taking 3.5 -5 seconds. Verified in Dev