UI & UXUI & UX
Conference - Short25min
BEGINNER

Optimizing API Integration in a Large-Scale React Application Using OpenAPI Generator

The CERN Business Computing Group is developing a React-based user interface for a major application by using OpenAPI Generator to automate HTTP client and TypeScript model creation. Initially facing performance issues due to memory overhead, they designed a React hook to optimize API interaction, enhancing efficiency and reducing memory use.

Stefano Marzo
Stefano MarzoCERN

talkDetail.whenAndWhere

Wednesday, June 11, 16:30-16:55
Room 4B
talks.description
In the CERN Business Computing Group, we are developing a new user interface for one of CERN’s largest business applications using React. Given the need to interact with hundreds of different backend endpoints, we implemented a strategy centered around OpenAPI Generator to automate the creation of HTTP client functions and TypeScript object models directly from API specifications. This approach ensures strict contract adherence between the frontend and backend, with generated code automatically refreshed through the CI/CD pipeline.While the initial implementation followed the standard OpenAPI Generator pattern of instantiating new API objects for each call, performance testing revealed significant memory overhead, resulting in slower page loads. To mitigate this, we developed an in-house React hook that optimizes the use of OpenAPI Generator, eliminating the need to instantiate new API objects for every call. This solution has notably improved performance and reduced memory allocation, providing a more efficient approach to API interaction in large-scale React applications.
react
optimization
performance
openapi
talks.speakers
Stefano Marzo

Stefano Marzo

CERN

Switzerland

Stefano is an IT Trainer and full-stack software developer at CERN, specializing in foundational code and core libraries that support the development of business applications and frameworks. His contributions empower various teams to create reliable applications that meet CERN's diverse business needs.
comments.title

comments.speakerNotEnabledComments