-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tech - Amélioration des performances de la requête des PNOs #3741
Conversation
|
@@ -68,10 +71,8 @@ class GetPriorNotifications( | |||
incompletePriorNotifications | |||
.map { priorNotification -> | |||
priorNotification.enrich(allRiskFactors, allPorts, priorNotification.isManuallyCreated) | |||
priorNotification.logbookMessageAndValue.logbookMessage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On ne calcule pas les noms dans chaque message PNO avant de faire le dernier filtre de pagination
@@ -137,8 +138,12 @@ class GetPriorNotifications( | |||
val (enrichedPaginatedList, enrichedPaginatedListTimeTaken) = | |||
measureTimedValue { | |||
paginatedList.apply { | |||
val reportings = getReportings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Au lieu de faire X fois la requête findAll
, on la fait une seule fois
.filter { it.isManuallyCreated } | ||
.mapNotNull { it.logbookMessageAndValue.logbookMessage.vesselId } | ||
.distinct() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On re met pas dans la clause IN
les doublons, ça permet d'avoir moins de données à transiter en IN/OUT
Linked issues