최적의 FPS 성능을 얻으려면 요청을 동시에 전송합니다.
예를 들어 다음 조건에서는 동시 요청 6개에서 20개로 늘리면 FPS를 30FPS에서 60FPS로 향상시킬 수 있습니다.
압축 사용 안 함
DICOM 데이터가 모두 동일한 리전에 있는 경우
DICOM 이미지 크기가 0.5MB인 경우
단일 요청에서 프레임 검색
retrieveStudy 및 retrieveSeries 메서드는 단일 요청에서 DICOM 파일 여러 개를 효율적으로 반환합니다.
이러한 메서드를 사용하면 최적의 동시 요청 수를 사용하는 속도와 동일한 속도로 이미지를 검색할 수 있습니다. 다음과 같은 경우 동시 요청을 사용하는 대신 단일 요청에서 이러한 메서드를 호출할 수 있습니다.
클라이언트는 전체 연구를 메모리에 저장하거나 응답을 스트림으로 파싱하여 한 번에 DICOM 인스턴스 하나를 처리할 수 있습니다.
검색된 이미지의 순서를 맞춤설정할 필요가 없습니다.
웹 뷰어 성능 향상
다음 섹션에서는 웹 뷰어를 사용하는 경우 DICOM 이미지 검색에 적용됩니다.
최대 동시 요청 수 늘리기
웹 기반 뷰어를 사용하는 경우 대부분의 브라우저는 호스트당 최대 연결 수를 적용합니다. 이 숫자는 일반적으로 6입니다. 하지만 실제로는 다음과 같은 이유로 인해 최대 동시 요청 수에 제한이 없습니다.
서버에서 HTTP/2를 지원하는 경우 대부분의 브라우저는 기본적으로 HTTP/2를 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-10(UTC)"],[[["\u003cp\u003eThis page details best practices for optimizing performance when working with DICOM data in the Cloud Healthcare API, focusing on improving frames per second (FPS) in medical imaging viewers.\u003c/p\u003e\n"],["\u003cp\u003eSending requests concurrently can significantly improve FPS, with an example showing an increase from 30 FPS to 60 FPS when increasing concurrent requests from six to 20 under specific conditions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eretrieveStudy\u003c/code\u003e and \u003ccode\u003eretrieveSeries\u003c/code\u003e methods allow for the efficient retrieval of multiple DICOM files in a single request, matching the performance of optimal concurrent requests under certain conditions.\u003c/p\u003e\n"],["\u003cp\u003eFor web viewers, the default limit on concurrent connections in browsers can be bypassed with HTTP/2, and tools like Cornerstone.js allow customization of maximum concurrent requests for optimized performance.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing web workers can enhance concurrency in JavaScript environments, potentially doubling a viewer's FPS by processing DICOM images and HTTP requests in separate threads.\u003c/p\u003e\n"]]],[],null,["# DICOM best practices\n\nThis page shows best practices for improving performance when working with\nDICOM data in the Cloud Healthcare API.\n\nMaximizing frames per second (FPS) in an imaging viewer\n-------------------------------------------------------\n\nThe [healthcare-imaging-performance-test](https://github.com/GoogleCloudPlatform/healthcare-imaging-performance-test)\ntool provides benchmarks that let you preview what FPS you can expect\nfor a DICOM medical imaging viewer that pulls data from the Cloud Healthcare API.\n\n### Sending requests concurrently\n\nFor the best FPS performance, [send requests concurrently](#sending_requests_concurrently).\nFor example, under the following conditions you can improve FPS from 30 FPS to\n60 FPS when going from six concurrent requests to 20:\n\n- Using no compression\n- When the DICOM data is all in the same region\n- When the DICOM images are 0.5 MB in size\n\n### Retrieving frames in a single request\n\nThe [`retrieveStudy`](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.studies/retrieveStudy)\nand [`retrieveSeries`](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.dicomStores.studies.series/retrieveSeries)\nmethods efficiently return multiple DICOM files in a single request.\nUsing these methods, you can retrieve images at the same rate as using an\noptimal number of concurrent requests. You can call these methods in a single\nrequest instead of using concurrent requests if the following are true:\n\n- The client can store the entire study in memory, or the client can parse the response as a stream to handle one DICOM instance at a time\n- You don't need to customize the order of the retrieved images\n\nImproving performance for web viewers\n-------------------------------------\n\nThe following sections apply to retrieving DICOM images when using a web viewer.\n\n### Increasing maximum concurrent requests\n\nWhen using a web-based viewer, most browsers enforce a maximum number of\nconnections per host. This number is typically six. However, in practice\nthere is no restriction on the maximum number of concurrent requests\nbecause:\n\n- Most browsers use HTTP/2 by default if the server supports HTTP/2\n- HTTP/2 uses a single connection for all requests\n\nFor example, if you use [Cornerstone.js](https://github.com/cornerstonejs/cornerstone)\nto build a viewer, you can modify the maximum number of concurrent requests\nto a number that is optimal for your viewer by changing [`maxSimultaneousRequests`](https://github.com/cornerstonejs/cornerstoneTools/blob/cefbb34e4a651ae49c0b066e36f6ccf0cb6ea89f/src/util/getMaxSimultaneousRequests.js#L5)\nwhen configuring Cornerstone.js.\n\n### Using web workers\n\nJavaScript is a single-threaded language, so extra care must be taken when\napplying concurrency patterns. You can use [web workers](https://en.wikipedia.org/wiki/Web_worker)\nto process both DICOM images and HTTP requests.\n\nFor example, if you modify your HTTP request processing to web workers, you\ncan effectively double your viewer's FPS from 30 FPS to 60 FPS assuming a\n30 millisecond request processing overhead."]]