Business Challenge
Common challenges included:
To address these issues, we conducted a comprehensive code audit, which allowed us to identify key bottlenecks, redundant logic, and areas with high technical debt. This audit laid the groundwork for targeted improvements across the platform.
Solution
Throughout 2024, our cross-functional team — including developers, DevOps experts, and a dedicated PM — worked in close collaboration with the client on a multi-phase performance optimization plan.
1. Faster Data Calculation
We started with an in-depth code audit that uncovered multiple inefficiencies in the current data processing logic. In response to these discoveries, the DevCom team:
- Refactored and optimized backend data flows
Problem Discovered: A new connection to the database was created on each iteration of retrieving the data of the same structure.
Pic. 1. Recursive calling for each result of getChildrenByDatasetIdWithSort – many database calls leads to slow performance
Pic. 2. All the elements are received at one database call; then the tree is structured on the Java side
- Optimized heavy SQL queries by avoiding unnecessary data joiningRefactored and optimized backend data flows
Problem Discovered: The query algorithm starts with a heavier operation when filtering rows after joining instead of to join prefiltered ones.
Pic. 3. Example of not-optimized query with LEFT JOIN operation to the whole large table
Pic. 4. Reorganized algorithm, optimized to use only necessary rows from big tables
- Significantly reduced the execution time of key statistics reports and Voronoi tools
- Shifted data preparation to pre-calculation methods
- Improved Excel generation and report exportin
2. Voronoi Report Enhancements
- Implemented percentage-based logic for square–polygon intersections
- Enriched polygon and field correlation data
- Improved naming, drawing, and layout of polygons
3. DevOps & Infrastructure Optimization
- Migrated parts of the system to Aurora Serverless and AWS Lambda
- Separated dependencies and improved task delivery via S3
- Refined VM configurations for performance
- Adopted infrastructure-as-code practices
- Migrated to Hetzner, including DNS and CI/CD
Results
With the Hetzner migration now complete, our next steps include finalizing team-side prerequisites, like Java updates and testing. This migration has already significantly reduced long-term infrastructure costs while maintaining reliability and performance.
Thanks to the initial code audit, the client now has a clear technical roadmap and a cleaner, more scalable codebase, making adopting new features and technologies easier.
The client is now positioned to deliver faster insights at lower costs, with a scalable foundation ready to support more advanced features by 2025.