Project

General

Profile

Actions

개선(improvement) #2310

open

[BE] Optimize Memory, CPU API search list flight

Added by harry harry 4 months ago. Updated 3 months ago.

Status:
진행(Doing)
Priority:
긴급(Emergency)
Assignee:
Start date:
12/15/2025
Due date:
12/15/2025 (about 3 months late)
% Done:

0%

Estimated time:
(Total: 18.00 h)
Part:
Build env.:

Description

Request:
Just need to update performance memory and cpu optimization, update fast GC memory Java with api. no logic change
example curl:

curl 'https://api.ohmytrip.com/flight/list/itinerary' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en,vi;q=0.9,vi-VN;q=0.8,fr-FR;q=0.7,fr;q=0.6,en-US;q=0.5' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'origin: https://www.ohmytrip.com' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'referer: https://www.ohmytrip.com/' \
  -H 'sec-ch-ua: "Chromium";v="142", "Google Chrome";v="142", "Not_A Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36' \
  --data-raw '{"stationTypeCode":"STN01","currency":"KRW","country":"KR","language":"KO","condition":{"adultCount":1,"cabinClassCode":"Y","childCount":0,"dynamicSearchYn":false,"infantCount":0,"itineraries":[{"departureDate":"2025-12-26","destinationCityCodeIata":"NGO","originCityCodeIata":"SEL","destinationAirportCode":"NGO"},{"departureDate":"2025-12-29","destinationCityCodeIata":"SEL","originCityCodeIata":"NGO","originAirportCode":"NGO"}],"tripTypeCode":"RT","sortOrder":"RecommendDesc","limits":[0,10]}}'


Files

picture396-1.png (69.9 KB) picture396-1.png harry harry, 11/13/2025 08:24 AM

Subtasks 5 (5 open0 closed)

개선(improvement) #2610: [BE] CRITICAL-1: Excessive JsonNode Traversal in Loops진행(Doing)Dante Le12/15/202512/15/2025

Actions
개선(improvement) #2611: [BE] CRITICAL: AtomicReference Memory Retention in getListItinerary()진행(Doing)Dante Le12/15/202512/15/2025

Actions
개선(improvement) #2626: [BE] CRITICAL-2: O(n³) Nested Loop Anti-Pattern in getForFilter()신규(New)Dante Le12/15/2025

Actions
개선(improvement) #2627: [BE] CRITICAL-3: Repeated Deep Copy Operations신규(New)Dante Le12/15/2025

Actions
개선(improvement) #2628: [BE] CRITICAL-4: String Concatenation in Streams신규(New)Dante Le12/15/2025

Actions
Actions #1

Updated by harry harry 4 months ago

  • Tracker changed from QA to 기능(Feature)
Actions #2

Updated by harry harry 4 months ago

  • Tracker changed from 기능(Feature) to 개선(improvement)
Actions #3

Updated by harry harry 4 months ago

  • Description updated (diff)
Actions #4

Updated by Dante Le 4 months ago

  • Status changed from 신규(New) to 진행(Doing)
  • Start date set to 11/18/2025
Actions #5

Updated by Dante Le 3 months ago

Created child issue #2626 - CRITICAL-2: O(n³) Nested Loop Anti-Pattern in getForFilter()

This addresses the 485-line method with triple nested loops causing O(n⁴) performance degradation. See issue details for complete analysis and fix requirements.

Actions #6

Updated by Dante Le 3 months ago

Created child issue #2627 - CRITICAL-3: Repeated Deep Copy Operations

This addresses 15+ deepCopy() calls throughout the service creating 100-500 KB garbage per request and triggering excessive GC pressure. See issue details for all locations and fix strategies.

Actions #7

Updated by Dante Le 3 months ago

Created child issue #2628 - CRITICAL-4: String Concatenation in Streams

This addresses 200-320 String object allocations per basket request caused by inefficient string concatenation with `+` operators and String.format(). Fix will use StringBuilder with pre-calculated capacity.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 50 MB)