avniproject / avniproject/avni-server
Optimize /v2/syncDetails, by improving location entities isEntityChanged() calls
- Dominant language
- Java
- Stars
- 22
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
### Motivation
WebTransaction/SpringController/v2/syncDetails (POST) call does not seem to have improved with the fix done as part of
https://github.com/avniproject/avni-server/issues/798
We see through trace that currently, following 2 invocations are costly and are good candidates for the Removal of RLS and query invocation approach.
- LocationRepository.isEntityChanged(SyncParameters syncParameters);
- LocationMappingRepository.isEntityChanged(SyncParameters syncParameters);
### Acceptance Criteria
Optimize /v2/syncDetails (POST) call, by removing RLS during invocation of
- LocationRepository.isEntityChanged(SyncParameters syncParameters);
- LocationMappingRepository.isEntityChanged(SyncParameters syncParameters);
Ensure performance impact is not shifted to any other place in the same call.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the WebTransaction/SpringController/v2/syncDetails POST entry point and trace the calls to LocationRepository.isEntityChanged(SyncParameters) and LocationMappingRepository.isEntityChanged(SyncParameters). Compare the trace before and after removing RLS for those invocations, and verify that the endpoint improves without shifting the performance cost elsewhere in the same call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql, spring-boot
- Domain
- backend, databases, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100